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

Re: st: RE: predict residual after treatreg

From   n j cox <>
Subject   Re: st: RE: predict residual after treatreg
Date   Sun, 01 Jun 2008 18:02:07 +0100

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:

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