This repository contains Stata code and instructions for performing dynamic panel data analysis, including the estimation of pooled OLS, fixed effects, random effects, and Arellano-Bond models. The analysis focuses on understanding the relationship between variables such as wage (lwage
), occupation (occ
), region (south
), and industry (ind
), using panel data.
The data was provided during the Workshop on Panel Data Analysis at Rabindra Bharati University, held on 22nd March 2024.
- Resource Person: Prof. Tusher Nandi, Indian Institute of Science Education
Special thanks to Rabindra Bharati University for organizing the workshop and to Prof. Tusher Nandi for providing the dataset and sharing his invaluable insights on Dynamic panel data analysis.
- Step 1: Load and Explore the Data
- Step 2: Data Preprocessing
- Step 3: Preliminary Model Estimation
- Step 4: Arellano-Bond Dynamic Panel-Data Estimation
- Step 5: Advanced Arellano-Bond Models
- Data Source
- Acknowledgment
- Contact
The data is loaded from a .dta
file:
use "path/to/dynamic_panel_data.dta", clear
We begin by describing the dataset and summarizing it to check for missing values and overall statistics:
describe
summarize
We also check the structure of the panel data:
xtset
Before proceeding with analysis, it is important to identify missing values in the dataset:
misstable summarize
A pooled OLS estimation is performed for comparison:
reg lwage l.lwage occ south ind, robust
The fixed effects model is estimated using:
xtreg lwage l.lwage occ south ind, fe robust
The random effects model is estimated using:
xtreg lwage l.lwage occ south ind, re robust
The basic Arellano-Bond estimation is performed with a lag of 2 for the dependent variable:
xtabond lwage, lags(2) vce(robust)
A two-step Arellano-Bond estimation is used for more accurate standard errors:
xtabond lwage, lags(2) twostep vce(robust)
We restrict the lag depth and perform Arellano-Bond estimation:
xtabond lwage, lags(2) twostep maxldep(1) vce(robust)
xtabond lwage, lags(2) twostep maxldep(2) vce(robust)
The Arellano-Bond model is extended to include additional explanatory variables:
xtabond lwage occ south ind, lags(2) twostep maxldep(2) vce(robust)
We define predetermined and endogenous variables, and estimate the Arellano-Bond model:
xtabond lwage occ south ind, lags(2) twostep maxldep(3) ///
pre(wks, lag(1, 2)) endogenous(union, lag(0, 2)) vce(robust)
We add the autocorrelation test for Arellano-Bond estimations:
xtabond lwage occ south ind, lags(2) twostep maxldep(3) ///
pre(wks, lag(1, 2)) endogenous(union, lag(0, 2)) vce(robust) artest(3)
For queries or feedback, please contact:
Sangita Das
Email: dassangita844@gmail.com
Note: This repository and analysis are intended for educational purposes only.