No, it is not correct. You want
predict resglm, res
as Maarten implied.
Nick
[email protected]
Cinzia Rienzo
> thanks Marteen,
> for glm i used: predict resglm
> for ols i use: predict resols, resid
>
> is this correct?
> but when i use the predict of Glm i get (almost) the same result!
Maarten buis wrote:
> >Looking at the resglm results I don't think they are the
> residuals but
> >the linear predictor. Did you correctly use -predict- here
> (the options
> >of predict after -glm- are different than those after -regress-).
Cinzia Rienzo
> >> i am replicating a paper so i know the results i should
> get; the aim
> >> is
> >> to analyse the residual of a regression;
> >> the problem is that when i regress the following:
> >>
> >> glm lwage1 age educ educage educage2 educage3 educage4 [aw=hwt]
> >>
> >> i obtain the same results as the author exept for the
> variance gap of
> >>
> >> the 90-10 centile.
> >>
> >> When instead i regress the following:
> >> reg lwage1 age educ educage educage2 educage3 educage4 [aw=hwt]
> >> i get the same 90-10 gap centile but the other results are
> different.
> >>
> >> Both regressions give the same coefficient but the residual are
> >> different:
> >>
> >> Variable | Obs Mean Std. Dev. Min Max
> >>
> ------------+--------------------------------------------------------
> >> resols | 1761676 -.0012382 .454438 -2.421267 3.340183
> >> resglm | 1761676 1.77811 .3409537 .6651884 2.437594
> >>
> >> Could you please suggest me what could be the problem or is it
> >> methodologically not correct to work with the two regressions and
> >> therefore with the two residuals?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/