[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Shehzad Ali" <sia500@york.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: predict residual after treatreg |

Date |
Mon, 2 Jun 2008 14:52:10 +0100 |

Thanks, Martin and Nick. I will use - gen - to get my residuals. Shehzad -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of n j cox Sent: 01 June 2008 18:02 To: statalist@hsphsun2.harvard.edu Subject: Re: st: RE: predict residual after treatreg Following Martin's suggestion: 1. It is evident that -predict- after -treatreg- does not support residual calculation. Thus you are asking for something not provided by Stata, as Stata is indeed telling you. 2. I can't comment on why not. But it would seem that predict predicted gen residual = y - predicted is what you need for vanilla flavour residuals. If you want some other flavour, the same tactic is indicated: you should use what is provided by -predict- as building blocks. Nick n.j.cox@durham.ac.uk Martin Weiss ********** webuse labor, clear g byte wc = 0 replace wc = 1 if we > 12 treatreg ww wa cit, treat(wc=wmed wfed) two db predict ********** to see the available options under predict... Alternatively type -h treatreg postestimation- Shehzad Ali I am trying to predict residuals after running treatreg command. Here is what I am doing: treatreg y x1 x2 x3, treat (x1=x2 x3 x4) twostep predict r, resid treatreg command works but predict command gives this error 'option resid not allowed'. * * 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/ * * 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/

**References**:**Re: st: RE: predict residual after treatreg***From:*n j cox <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: prediction after y-logged regression** - Next by Date:
**st: RE: RE: prediction after y-logged regression** - Previous by thread:
**Re: st: RE: predict residual after treatreg** - Next by thread:
**Re: st: STATA code for identifying similar observations within groupid** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |