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]
Re: st: regplot.ado after xtmixed, fixed and fixed-plus-random predictions, Stata11.2
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: regplot.ado after xtmixed, fixed and fixed-plus-random predictions, Stata11.2
Date
Tue, 9 Aug 2011 23:44:11 +0100
You might get away with that. If it works, I get some of the credit.
If it doesn't, you take all the blame.
Nick
On Tue, Aug 9, 2011 at 10:13 PM, Steve Rothenberg <[email protected]> wrote:
> 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?
*
* 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/