# st: Problem with nlcom (expression too long)

 From Valerie Orozco To "statalist@hsphsun2.harvard.edu" Subject st: Problem with nlcom (expression too long) Date Tue, 19 Feb 2008 21:48:51 +0100

```Hello,

I have a problem with “nlcom” due to a problem of length.

I try to estimate a lot of coefficients from a first estimation. The problem of length comes from the fact that some coefficients I have to estimate are also combinations of coefficients I estimate in the same “nlcom” command and so, it implies long expressions. I do that because I need all the coefficients in e(b) and e(V). (If I do in 2 steps, I don’t have the estimated variance covariance matrix of the transformed coefficients)

For example, some coefficients I have to estimate after my estimation are:

a14:  1 - ( _b[a1]+  _b[a2]+  _b[a3]+  _b[a4]+  _b[a5]+  _b[a6]+  _b[a7]+  _b[a8]+  _b[a9]+  _b[a10]+  _b[a11]+  _b[a12]+  _b[a13])

b14:  - ( _b[b1]+  _b[b2]+  _b[b3]+  _b[b4]+  _b[b5]+  _b[b6]+  _b[b7]+  _b[b8]+  _b[b9]+  _b[b10]+  _b[b11]+  _b[b12]+  _b[b13])

g1vs1:  _b[teta_1vs1] - _b[a1] * _b[a1] + _b[a1]
g1vs2:  _b[teta_1vs2] - _b[a1]* _b[a2]
g1vs3:  _b[teta_1vs3] - _b[a1]* _b[a3]
g1vs4:  _b[teta_1vs4] - _b[a1]* _b[a4]
g1vs5:  _b[teta_1vs5] - _b[a1]* _b[a5]
…
g1vs14:  -( _b[teta_1vs1] - _b[a1] * _b[a1] + _b[a1] +  _b[teta_1vs2] - _b[a1] * _b[a2] +  _b[teta_1vs3] - _b[a1] * _b[a3] +  _b[teta_1vs4] - _b[a1] * _b[a4] +  _b[teta_1vs5] - _b[a1] * _b[a5] +  _b[teta_1vs6] - _b[a1] * _b[a6] +  _b[teta_1vs7] - _b[a1] * _b[a7] +  _b [teta_1vs8] - _b[a1] * _b[a8] +  _b[teta_1vs9] - _b[a1] * _b[a9] +  _b[teta_1vs10] - _b[a1] * _b[a10] +  _b[teta_1vs11] - _b[a1] * _b[a1 1] +  _b[teta_1vs12] - _b[a1] * _b[a12] +  _b[teta_1vs13] - _b[a1] * _b[a13] +   0)
/*it would be easier to write g1vs14:  -( g1vs1 +  g1vs2 +  g1vs3+  g1vs4 +  g1vs5 +  …. +g1vs13)*/

g2vs14:  -( _b[teta_1vs2] - _b[a2] * _b[a1] +  _b[teta_2vs2] - _b[a2] * _b[a2] + _b[a2] +  _b[teta_2vs3] - _b[a2] * _b[a3] +  _b[teta_2vs4] - _b[a2] * _b[a4] +  _b[teta_2vs5] - _b[a2] * _b[a5] +  _b[teta_2vs6] - _b[a2] * _b[a6] +  _b[teta_2vs7] - _b[a2] * _b[a7] +  _b[teta_2vs8] - _b[a2] * _b[a8] +  _b[teta_2vs9] - _b[a2] * _b[a9] +  _b[teta_2vs10] - _b[a2] * _b[a10] +  _b[teta_2vs11] - _b[a2] * _b[a11] +  _b[teta_2vs12] - _b[a2] * _b[a12] +  _b[teta_2vs13] - _b[a2] * _b[a13] +   0)

….

The main problem concerns g14vs14 which is equal to  -(sum on i of the g`I’vs14), because if I write g14vs14 in terms of the tetas, I have a very long expression….and stata tells me :
expression too long
r(130);

If someone has an idea…

Thank you very much.

Valérie

-------------------------------
Valérie OROZCO
Toulouse School of Economics (INRA-GREMAQ)
21, allée de Brienne
F-31000 Toulouse, France

MF 426
+33 5 61 12 85 91
-------------------------------

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