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 at the end of May, and its replacement, statalist.org is already up and running.


[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 <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <drlead@prodigy.net.mx> 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/


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