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: predictnl expression too long


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: predictnl expression too long
Date   Fri, 8 Mar 2013 17:48:27 +0100

On Fri, Mar 8, 2013 at 5:17 PM, Richard J Swartz <rswartz@rice.edu> wrote:
> After reading the comments and help files on predict, it looks like predict() and xb() have set quantities they can produce involving the linear portion of the model (XB).  Is this correct?
> If so then, unfortunately the function I'm estimating cannot be simplified by predict() or xb() because  the function I want to predict use a subset of the linear component, (i.e. a subset of the predictors) as opposed to the full XB linear component.

The trick is that if you want the xb excluding the componenent
associated with variable x1 than you just type xb() - _b[x1]*x1, which
is often a lot shorter than explicitly typing out the components you
want to include.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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