Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: "Expression too long" error with nl command


From   <[email protected]>
To   <[email protected]>
Subject   st: "Expression too long" error with nl command
Date   Tue, 1 Aug 2006 16:57:38 +0100

Dear all,

I am trying to estimate a non-linear model of the form 

Depvar = linear combination of 300 fixed effect dummy variables + alpha
* (log(linear combination of 10 variables)) + beta * (log(linear
combination of 10 other variables))

Stata doesn't like that and tells me
"error #130 occurred in evaluating expression
expression too long"
The matter is not the length of the command I feed Stata as measured in
terms of characters or lines : it is actually only a few lines long (see
below). Apparently it is the number of parameters to estimate, or of
variables, that causes the problem.

Does anybody know of a way I could estimate this nonetheless with Stata?
If I could just get the fixed effects out of the model specification,
but still have Stata take them into account, I would be happy as well,
but it seems like there is no such option for nl (as opposed to xtreg's
fe option).

I checked in the Statalist archives, but apparently last time someone
asked this the question remained pretty much open.



(Below is the model I try to feed Stata)

#delimit ;
nl (lmv=

{mu1} + {ttw: ttw*}

+ {alpha}*(log(

u1+{t1:u0 u2 u3 u4 u5 u6 u7 u8 u9}

))

+ {beta}*(log(

v1+{z1:v2 v3 v4 v5 v6 v7 v8 v9}

))), 

initial(
t1_u0 .1 t1_u2 .1 t1_u3 .1 t1_u4 .1 t1_u5 .1 t1_u6 .1 t1_u7 .1 t1_u8 .1
t1_u9 .1 
z1_v2 .1 z1_v3 .1 z1_v4 .1 z1_v5 .1 z1_v6 .1 z1_v7 .1 z1_v8 .1 z1_v9 .1
);
#delimit cr

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index