Bookmark and Share

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


From   Maarten Buis <[email protected]>
To   [email protected]
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 <[email protected]> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index