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

RE: st: RE: predict residual after treatreg

From   "Shehzad Ali" <>
To   <>
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.


-----Original Message-----
[] On Behalf Of n j cox
Sent: 01 June 2008 18:02
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.


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:

*   For searches and help try:

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