![Statalist](/includes/images/head_statalist.jpg) |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
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
[email protected]
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/