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   Richard J Swartz <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: predictnl expression too long
Date   Fri, 8 Mar 2013 14:21:48 -0600

Brilliant! (and obvious - don't know why I didn't see it!)  Unfortunately after recoding to use xb()  I get the same message "expression too long".  Do you (or anyone else) know any other possibilities?  (by the way, I noticed some of the slashes were the wrong direction, but fixing this didn't solve the problem either.)

Thanks,
Richard 
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten Buis
Sent: Friday, March 08, 2013 10:48 AM
To: [email protected]
Subject: Re: st: predictnl expression too long

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/


*
*   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