Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Initial values in -nl-

From   "Herve STOLOWY" <>
To   <>
Subject   st: Initial values in -nl-
Date   Fri, 12 Nov 2010 18:48:39 +0100

Dear Statalisters:

Last week, I asked a question relating to inequality constraints in a
regression. I received several interesting answers, including the
following one from Isabel (Stata Corp), who suggested to use -nl- for
the constraint: a1 < a2:

nl  (y = {a1}*x1 +({a1} + exp({c}))*x2 + {a3}), initial (a1 1 c 1   a3

I applied it to the sample created by Isabel and it works perfectly.

Now, I try to replicate this solution to my model which is the

regress VTA g_t g_ca g_i g_ca_t g_ca_i g_t_i g_ca_t_i, noconst

I use -nl- (firstly without any constraint)  and get the same results: 

nl (VTA = {a1}*g_t + {a2}*g_ca + {a3}*g_i + {a4}*g_ca_t + {a5}*g_ca_i +
{a6}*g_t_i + {a7}*g_ca_t_i)

Now, I introduce the constraint a2< a4 by replacing a4 by ({a2}+ exp{c})
(as in the example provided by Isabel):

nl (VTA = {a1}*g_t + {a2}*g_ca + {a3}*g_i + ({a2}+ exp{c})*g_ca_t +
{a5}*g_ca_i + {a6}*g_t_i + {a7}*g_ca_t_i), initial(a1 1 a2 1 a3 1 c 1 a5
1 a6 1 a7 1)

I get an error message concerning the initial values (I guess):

error #111 occurred in evaluating expression
exp__000002 not found
starting values invalid or some RHS variables have missing values

I have read the help file of -nl- but, to be honest, I do not understand
very well how the initial values work. (One thing: I do not have missing
values in my data file. However, several values are 0).

Do you know what should I have as initial values?

Best regards

Hervé Stolowy

HEC Paris
Departement Comptabilite Controle de gestion / Dept of Accounting and
Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
mail: stolowy at hec dot fr
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index