100 likes | 121 Views
Stata 5, Mixed Models Not finished. Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/. Jan-20. H.S. 1. Dependent data. Ability to recognize neighbor car. Distribution by sex. Model 1. regress rc Model without sex predict res, res Residuals
E N D
Stata 5, Mixed ModelsNot finished Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/ Jan-20 H.S. H.S. 1
Dependent data Ability to recognize neighbor car H.S.
Distribution by sex H.S.
Model 1 regress rcModel without sex predict res, resResiduals twoway (scatter res id)Residual plot H.S.
Residuals sorted H.S.
Model 2 gen male =(sex==0) gen female=(sex==1) regress rc male female, noconstModel with sex predict res, resResiduals twoway (scatter res id)Residual plot Model results: male = 0.7 female=-0.7 H.S.
3 lessons learned • Omitting predictor dependent residuals • Not evident from residual plot • + constant terms remove dependencies • y-data may be dependent, y|x (or residuals) must be independent H.S.
2 data sets H.S.
Compare regression methods • Fixed effects models • Conditional models • Mixed models H.S.