Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: predict residuals in Stata 10

From   "Martin Weiss" <>
To   <>
Subject   st: AW: predict residuals in Stata 10
Date   Thu, 25 Mar 2010 10:49:54 +0100


Everything depends on which residual you are talking about:

//     Setup
vers 10.1
webuse nlswork, clear

gen age2 = age*age
gen ttl_exp2 = ttl_exp*ttl_exp
gen tenure2 = tenure*tenure
gen byte black = race==2

xtset idcode

//    Fixed-effects model
xtreg ln_w grade age* ttl_exp* /* 
 */  tenure* black not_smsa south, fe
predict comb, ue
predict error, e

The panel case is obviously not just an extension of -regress- where you can
indeed use the syntax -predict res, res-. Look at -help xtreg postestimation
,mark(predict)- to see all available -predict- options after -xtreg-...


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Marco Buur
Gesendet: Donnerstag, 25. März 2010 10:35
Betreff: st: predict residuals in Stata 10

Dear Stata members,

I would like to predict residuals after xtreg  command (Stata 10) in
order to use meanonly residuals for Duan smearing antilog

predict res, res

but it doesn't work in Stata 10

Any hint?

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index