110 likes | 198 Views
psid3.do. Panel study of income dynamics Longitudinal data of 5000 households started in 1969 HH members followed annually since This example has 5-years worth of data for 789 continuously employed full time male workers 5*789 = 3945 obs.
E N D
psid3.do • Panel study of income dynamics • Longitudinal data of 5000 households started in 1969 • HH members followed annually since • This example has 5-years worth of data for 789 continuously employed full time male workers • 5*789 = 3945 obs
1st exercise, ignore panel nature of data and estimate human capital earnings function • Regress log hourly wage on • Education • Tenure and tenure2 • Experiene and experience 2 • Race • Union status
*generate new variables; • gen exp=age-educ-5; • gen exp2=exp*exp; • gen wage=laborinc/hours; • gen wagel=log(wage); • gen tenure2=tenure*tenure;
* get OLS estimates; • reg wagel exp exp2 tenure tenure2 union educ black;
Notice R2 and compare to FE in next regression
Areg constructs within Panel means rather than Estimate LSDV model Data must Be sorted by ID Big jump in R2 ID is the variable That identifies Groups for Fixed-effects Number of groups (N in class notation)
. * now estimate a model with fixed effects; • . * the xi command is used to construct a series of; • . * dummy variables. suppose you have a variable ; • . * x2 that has four values, 1,2,3,4. i.x2 will; • . * construct a set of 3 dummy variables, one for; • . * x2=1, x2=3 and x2=4. • > • > * notice that in the within group model, you; • . * must delete variables without any within-panel; • . * variation. in this case, educ and black; • . xi: reg wagel exp exp2 tenure tenure2 union i.id;
Rate of return to tenure • Yit =β0 + Eitβ1 + Eit2β2 + Titβ3 + Tit2β4 + Unionitβ5 + EDUCiγ1 + Blackiγ2 + εit dY/dT = β3 + 2 Titβ4 Return to tenure OLS FE 5 years 0.0232 0.0128 10 years 0.0157 0.0078 20 years 0.0007 -0.0022