Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: regplot.ado after xtmixed, fixed and fixed-plus-random predictions, Stata11.2
From
"Steve Rothenberg" <[email protected]>
To
<[email protected]>
Subject
st: regplot.ado after xtmixed, fixed and fixed-plus-random predictions, Stata11.2
Date
Tue, 9 Aug 2011 16:13:36 -0500
I've successfully used version 2.2.0 (30 March 2009) of -regplot- after
-xtmixed-. -regplot- is one of Nick Cox's contributions to Stata Journal
(SJ10-1; gr0009_1), part of his modeldiag package.
I've looked over the code from the ado file and it seems that the section:
// get fit
tempvar fit
qui predict `fit' if e(sample)
uses predict with no option, which is the default predict (xb), producing
estimated fixed effects predictions.
If I wanted to change the command (renaming it of course) so that it used
the predicted fixed plus predicted random effects instead of just the fixed
effect predictions, could I change the above to:
// get fit
tempvar fit
qui predict `fit' if e(sample), fitted
to obtain and plot those fitted values without changing other code in the
ado file?
Steve Rothenberg
National Institute of Public Health
Cuernavaca, Morelos, Mexico
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/