[Limdep Nlogit List] OLS constraints
William Greene
wgreene at stern.nyu.edu
Sat Nov 17 23:48:19 EST 2007
----- Original Message -----
From: "Erik Ferguson" <eferguson at aus.edu>
To: "Limdep and Nlogit Mailing List" <limdep at limdep.itls.usyd.edu.au>
Sent: Saturday, November 17, 2007 6:40:14 AM (GMT-0500) Auto-Detected
Subject: [Limdep Nlogit List] OLS constraints
I have a simple theoretical OLS model of the following form:
Y = a + b*x1 + c*x2
According to the theory, the estimated coefficients of this model should
be constrained as follows:
c = a - b
I have tried to program this model in Limdep in several different ways,
including the CLS command, but it does not seem to want to cooperate.
Is there a problem in constraining the intercept term?
Please advise. Thanks!
--
Erik Ferguson
Urban Planning Graduate Program
School of Architecture and Design
American University of Sharjah
PO Box 26666
Sharjah, UNITED ARAB EMIRATES
There is no problem. Please see below.
**************************************
--> samp;1-100$
--> crea;x1=rnn(0,1);x2=rnn(0,1);y=x1+x2+rnn(0,1)$
--> regr;lhs=y;rhs=one,x1,x2;cls:b(1)-b(2)-b(3)=0$
+----------------------------------------------------+
| Ordinary least squares regression |
| Model was estimated Nov 17, 2007 at 07:47:21AM |
| LHS=Y Mean = -.2977003E-01 |
| Standard deviation = 1.729971 |
| WTS=none Number of observs. = 100 |
| Model size Parameters = 3 |
| Degrees of freedom = 97 |
| Residuals Sum of squares = 106.2195 |
| Standard error of e = 1.046445 |
| Fit R-squared = .6414982 |
| Adjusted R-squared = .6341064 |
| Model test F[ 2, 97] (prob) = 86.79 (.0000) |
| Diagnostic Log likelihood = -144.9107 |
| Restricted(b=0) = -196.2018 |
| Chi-sq [ 2] (prob) = 102.58 (.0000) |
| Info criter. LogAmemiya Prd. Crt. = .1203559 |
| Akaike Info. Criter. = .1203379 |
| Autocorrel Durbin-Watson Stat. = 2.0157790 |
| Rho = cor[e,e(-1)] = -.0078895 |
+----------------------------------------------------+
+--------+--------------+----------------+--------+--------+----------+
|Variable| Coefficient | Standard Error |t-ratio |P[|T|>t]| Mean of X|
+--------+--------------+----------------+--------+--------+----------+
Constant| -.01539830 .10469604 -.147 .8834
X1 | .95953721 .11712426 8.192 .0000 -.02496906
X2 | 1.04648459 .11875324 8.812 .0000 .00916115
+----------------------------------------------------+
| Linearly restricted regression |
| Ordinary least squares regression |
| Model was estimated Nov 17, 2007 at 07:47:21AM |
| LHS=Y Mean = -.2977003E-01 |
| Standard deviation = 1.729971 |
| WTS=none Number of observs. = 100 |
| Model size Parameters = 2 |
| Degrees of freedom = 98 |
| Residuals Sum of squares = 238.5861 |
| Standard error of e = 1.560305 |
| Fit R-squared = .1947475 |
| Adjusted R-squared = .1865307 |
| Model test F[ 1, 98] (prob) = 23.70 (.0000) |
| Diagnostic Log likelihood = -185.3719 |
| Restricted(b=0) = -196.2018 |
| Chi-sq [ 1] (prob) = 21.66 (.0000) |
| Info criter. LogAmemiya Prd. Crt. = .9095654 |
| Akaike Info. Criter. = .9095600 |
| Autocorrel Durbin-Watson Stat. = 1.9275877 |
| Rho = cor[e,e(-1)] = .0362062 |
| Restrictns. F[ 1, 97] (prob) = 120.88 (.0000) |
| Not using OLS or no constant. Rsqd & F may be < 0. |
| Note, with restrictions imposed, Rsqd may be < 0. |
+----------------------------------------------------+
+--------+--------------+----------------+--------+--------+----------+
|Variable| Coefficient | Standard Error |t-ratio |P[|T|>t]| Mean of X|
+--------+--------------+----------------+--------+--------+----------+
Constant| .62949533 .12930700 4.868 .0000
X1 | .29922589 .14993092 1.996 .0488 -.02496906
X2 | .33026944 .14804790 2.231 .0280 .00916115
--> create;z1=x2+1;z2=x1-x2$
--> regr;lhs=y;rhs=z1,z2$
+----------------------------------------------------+
| Ordinary least squares regression |
| Model was estimated Nov 17, 2007 at 07:48:36AM |
| LHS=Y Mean = -.2977003E-01 |
| Standard deviation = 1.729971 |
| WTS=none Number of observs. = 100 |
| Model size Parameters = 2 |
| Degrees of freedom = 98 |
| Residuals Sum of squares = 238.5861 |
| Standard error of e = 1.560305 |
| Fit R-squared = .1947475 |
| Adjusted R-squared = .1865307 |
| Model test F[ 1, 98] (prob) = 23.70 (.0000) |
| Diagnostic Log likelihood = -185.3719 |
| Restricted(b=0) = -196.2018 |
| Chi-sq [ 1] (prob) = 21.66 (.0000) |
| Info criter. LogAmemiya Prd. Crt. = .9095654 |
| Akaike Info. Criter. = .9095600 |
| Autocorrel Durbin-Watson Stat. = 1.9275877 |
| Rho = cor[e,e(-1)] = .0362062 |
| Not using OLS or no constant. Rsqd & F may be < 0. |
+----------------------------------------------------+
+--------+--------------+----------------+--------+--------+----------+
|Variable| Coefficient | Standard Error |t-ratio |P[|T|>t]| Mean of X|
+--------+--------------+----------------+--------+--------+----------+
Z1 | .62949533 .12930700 4.868 .0000 1.00916115
Z2 | .29922589 .14993092 1.996 .0487 -.03413021
--> wald;fn1=b_z1-b_z2$
+-----------------------------------------------+
| WALD procedure. Estimates and standard errors |
| for nonlinear functions and joint test of |
| nonlinear restrictions. |
| Wald Statistic = 4.97659 |
| Prob. from Chi-squared[ 1] = .02569 |
+-----------------------------------------------+
+--------+--------------+----------------+--------+--------+
|Variable| Coefficient | Standard Error |b/St.Er.|P[|Z|>z]|
+--------+--------------+----------------+--------+--------+
Fncn(1) | .33026944 .14804790 2.231 .0257
More information about the Limdep
mailing list