day6prlm

day6prlm - 2/17/12 PADP 8130: Linear Models Func%onal Form...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
2/17/12 1 PADP 8130: Linear Models Func%onal Form PRACTICE Angela Fer±g, Ph.D. Graphing Residuals . drop if faminc==0 | faminc>200000 . global controls "black hisp femalehd marriedhd hsdropout somecoll collgrad” . reg faminc agehd $controls Source | SS df MS Number of obs = 7874 -------------+------------------------------ F( 8, 7865) = 557.94 Model | 5.0511e+12 8 6.3139e+11 Prob > F = 0.0000 Residual | 8.9004e+12 7865 1.1316e+09 R-squared = 0.3620 -------------+------------------------------ Adj R-squared = 0.3614 Total | 1.3951e+13 7873 1.7721e+09 Root MSE = 33640 ------------------------------------------------------------------------------ faminc | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- agehd | -9.191745 23.46079 -0.39 0.695 -55.18112 36.79763 black | -7948.57 864.8022 -9.19 0.000 -9643.812 -6253.328 hisp | -6509.834 1466.545 -4.44 0.000 -9384.652 -3635.016 femalehd | -9855.997 1049.758 -9.39 0.000 -11913.8 -7798.192 marriedhd | 30599.6 998.114 30.66 0.000 28643.03 32556.17 hsdropout | -12050.58 1100.615 -10.95 0.000 -14208.08 -9893.079 somecoll | 9494.272 995.9732 9.53 0.000 7541.9 11446.64 collgrad | 26101.1 1065.617 24.49 0.000 24012.21 28189.99 _cons | 44578.75 1419.408 31.41 0.000 41796.34 47361.17 ------------------------------------------------------------------------------ . predict r1, resid . scatter r1 agehd
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2/17/12 2 ScaDer plot of residuals rela:ve to key independent variable (age) -100000 0 100000 200000 Residuals 20 40 60 80 100 Age of head in 2007 Want to see if non-linear paDern so don’t want lFt – use lowess instead . Scatter r1 agehd || lowess r1 agehd 20 40 60 80 100 Age of head in 2007 Residuals lowess r1 agehd
Background image of page 2
2/17/12 3 Turning categorical variable into set of dummy variables in one line of Stata . gen educbr=1 if hsdropout==1 . replace educbr=2 if educhd==12 . replace educbr=3 if somecoll==1 . replace educbr=4 if collgrad==1 . xi: reg lnfaminc agehd black hisp femalehd marriedhd i.educbr i.educbr _Ieducbr_1-4 (naturally coded; _Ieducbr_1 omitted)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

day6prlm - 2/17/12 PADP 8130: Linear Models Func%onal Form...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online