## Non-linear systems estimation with equality constraints

Econometrics questions and discussions

### Non-linear systems estimation with equality constraints

Dear Tom,

I try to use "nlsystem" to estimate a system of linear equations with equality constraints using "nonlin." Although the results show that the constrainted coefficients are all equal as expected, std error, t-stat, and significance are zeros for all constrainted coefficients, except for the last constrainted coefficient in each constraint (i.e., h11, h12, h13, and h14, and g21, g22, g23, g24). I wonder if I did something wrong with my codes. The following is my RATS codes and the estimation results:

nonlin(parmset=base) co11 co12 co21 co22 co31 co32 co41 co42 \$
a11 a12 a13 a14 a21 a22 a23 a24 b11 b12 b13 b14 b21 b22 b23 b24 \$
c11 c12 c13 c14 c21 c22 c23 c24 d11 d12 d13 d14 d21 d22 d23 d24 \$
e11 e12 e13 e14 e21 e22 e23 e24 f11 f12 f13 f14 f21 f22 f23 f24 \$
g11 g12 g13 g14 g21 g22 g23 g24 h11 h12 h13 h14 h21 h22 h23 h24

nonlin(parmset=constraint) b11=d11=f11=h11 \$
b12=d12=f12=h12 \$
b13=d13=f13=h13 \$
b14=d14=f14=h14 \$
a21=c21=e21=g21 \$
a22=c22=e22=g22 \$
a23=c23=e23=g23 \$
a24=c24=e24=g24

compute b11=d11=f11=h11=0.0
compute b12=d12=f12=h12=0.0
compute b13=d13=f13=h13=0.0
compute b14=d14=f14=h14=0.0

compute a21=c21=e21=g21=0.0
compute a22=c22=e22=g22=0.0
compute a23=c23=e23=g23=0.0
compute a24=c24=e24=g24=0.0

Non-Linear System Estimation
Convergence in 4 Iterations. Final criterion was 0.0000082 <= 0.0000100

Usable Observations 2866
Skipped/Missing (from 2870) 4
Log Likelihood 62591.0063

Dependent Variable P1_LAG
Mean of Dependent Variable 0.0029303115
Std Error of Dependent Variable 0.0266720986
Standard Error of Estimate 0.0263820515
Sum of Squared Residuals 1.9947722227
Durbin-Watson Statistic 1.8579

Mean of Dependent Variable 0.0027981551
Std Error of Dependent Variable 0.0411705045
Standard Error of Estimate 0.0411480398
Sum of Squared Residuals 4.8525999466
Durbin-Watson Statistic 1.7437

Dependent Variable P2_LAG
Mean of Dependent Variable 0.0030291086
Std Error of Dependent Variable 0.0175936706
Standard Error of Estimate 0.0171379308
Sum of Squared Residuals 0.8417690540
Durbin-Watson Statistic 1.7809

Mean of Dependent Variable 0.0035190696
Std Error of Dependent Variable 0.0335464070
Standard Error of Estimate 0.0334624182
Sum of Squared Residuals 3.2091560068
Durbin-Watson Statistic 1.7375

Dependent Variable P3_LAG
Mean of Dependent Variable 0.0036190085
Std Error of Dependent Variable 0.0154705367
Standard Error of Estimate 0.0145366304
Sum of Squared Residuals 0.6056248408
Durbin-Watson Statistic 1.7902

Mean of Dependent Variable 0.0037132040
Std Error of Dependent Variable 0.0298358820
Standard Error of Estimate 0.0297371443
Sum of Squared Residuals 2.5343973497
Durbin-Watson Statistic 1.7333

Dependent Variable P4_LAG
Mean of Dependent Variable 0.0030517270
Std Error of Dependent Variable 0.0254570113
Standard Error of Estimate 0.0254640804
Sum of Squared Residuals 1.8583699722
Durbin-Watson Statistic 1.7491

Mean of Dependent Variable 0.0023421080
Std Error of Dependent Variable 0.0396799645
Standard Error of Estimate 0.0400489304
Sum of Squared Residuals 4.5968256328
Durbin-Watson Statistic 1.6684

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. CO11 0.002677462 0.000498135 5.37497 0.00000008
2. CO12 0.002847399 0.000772971 3.68371 0.00022986
3. CO21 0.002455258 0.000325901 7.53375 0.00000000
4. CO22 0.003358841 0.000631249 5.32094 0.00000010
5. CO31 0.002483427 0.000280231 8.86207 0.00000000
6. CO32 0.003518926 0.000564260 6.23636 0.00000000
7. CO41 0.003243652 0.000479954 6.75826 0.00000000
8. CO42 0.002632322 0.000751942 3.50070 0.00046404
9. A11 -0.011233071 0.013514112 -0.83121 0.40585476
10. A12 0.014480719 0.013543816 1.06918 0.28499049
11. A13 0.001665904 0.013539459 0.12304 0.90207491
12. A14 0.019395590 0.013496060 1.43713 0.15068113
13. A21 -0.034925331 0.000000000 0.00000 0.00000000
14. A22 0.025422566 0.000000000 0.00000 0.00000000
15. A23 0.007085200 0.000000000 0.00000 0.00000000
16. A24 -0.012944000 0.000000000 0.00000 0.00000000
17. B11 0.032862462 0.000000000 0.00000 0.00000000
18. B12 0.017129836 0.000000000 0.00000 0.00000000
19. B13 0.012090035 0.000000000 0.00000 0.00000000
20. B14 0.002956426 0.000000000 0.00000 0.00000000
21. B21 0.013064856 0.012156766 1.07470 0.28250982
22. B22 -0.021894365 0.012217098 -1.79211 0.07311559
23. B23 0.007221473 0.012224129 0.59076 0.55468418
24. B24 -0.000268916 0.012172427 -0.02209 0.98237438
25. C11 0.046030984 0.012517564 3.67731 0.00023571
26. C12 0.009108142 0.012612764 0.72214 0.47021031
27. C13 0.028638173 0.012615014 2.27017 0.02319753
28. C14 0.030620761 0.012443213 2.46084 0.01386120
29. C21 -0.034925331 0.000000000 0.00000 0.00000000
30. C22 0.025422566 0.000000000 0.00000 0.00000000
31. C23 0.007085200 0.000000000 0.00000 0.00000000
32. C24 -0.012944000 0.000000000 0.00000 0.00000000
33. D11 0.032862462 0.000000000 0.00000 0.00000000
34. D12 0.017129836 0.000000000 0.00000 0.00000000
35. D13 0.012090035 0.000000000 0.00000 0.00000000
36. D14 0.002956426 0.000000000 0.00000 0.00000000
37. D21 0.012652666 0.010454242 1.21029 0.22616760
38. D22 0.001621584 0.010482924 0.15469 0.87706721
39. D23 0.018568878 0.010483113 1.77131 0.07650862
40. D24 0.025830520 0.010428620 2.47689 0.01325336
41. E11 0.133235924 0.013719079 9.71172 0.00000000
42. E12 0.031507824 0.013973203 2.25487 0.02414119
43. E13 0.052619095 0.013964362 3.76810 0.00016450
44. E14 0.029614050 0.013479313 2.19700 0.02802045
45. E21 -0.034925331 0.000000000 0.00000 0.00000000
46. E22 0.025422566 0.000000000 0.00000 0.00000000
47. E23 0.007085200 0.000000000 0.00000 0.00000000
48. E24 -0.012944000 0.000000000 0.00000 0.00000000
49. F11 0.032862462 0.000000000 0.00000 0.00000000
50. F12 0.017129836 0.000000000 0.00000 0.00000000
51. F13 0.012090035 0.000000000 0.00000 0.00000000
52. F14 0.002956426 0.000000000 0.00000 0.00000000
53. F21 0.012873703 0.010694641 1.20375 0.22868520
54. F22 0.022729168 0.010767066 2.11099 0.03477318
55. F23 0.017105890 0.010778442 1.58705 0.11250207
56. F24 0.014138720 0.010769218 1.31288 0.18922246
57. G11 -0.087796792 0.011332945 -7.74704 0.00000000
58. G12 -0.012755383 0.011377477 -1.12111 0.26224180
59. G13 -0.004279019 0.011381093 -0.37598 0.70693468
60. G14 -0.007988238 0.011356455 -0.70341 0.48180059
61. G21 -0.034925331 0.012731123 -2.74330 0.00608245
62. G22 0.025422566 0.012708838 2.00038 0.04545874
63. G23 0.007085200 0.012685672 0.55852 0.57648945
64. G24 -0.012944000 0.012554222 -1.03105 0.30251852
65. H11 0.032862462 0.005651892 5.81442 0.00000001
66. H12 0.017129836 0.005675592 3.01816 0.00254316
67. H13 0.012090035 0.005677809 2.12935 0.03322542
68. H14 0.002956426 0.005661458 0.52220 0.60152951
69. H21 -0.060703731 0.011946175 -5.08144 0.00000037
70. H22 -0.026080918 0.011993131 -2.17465 0.02965600
71. H23 -0.008570589 0.011993328 -0.71461 0.47484814
72. H24 -0.009256857 0.011991922 -0.77192 0.44015921
Wen-I Chuang

Posts: 3
Joined: Mon Feb 21, 2022 9:43 pm

### Re: Non-linear systems estimation with equality constraints

No. The a=b type constraints simply substitute out parameters so only one actually is estimated. The only one estimated is the one that has standard errors.
TomDoan

Posts: 7385
Joined: Wed Nov 01, 2006 5:36 pm

### Re: Non-linear systems estimation with equality constraints

Dear Tom,

I retry again by modifying the constraints using "==" rather than "=" in "nonlin(parmset=constraint)" for example, b11==d11==f11==h11. The output is more weird in that the constraint coefficients are not equal. Moreover, although the first three constrainted coefficents in each constraint equation do have standard errors, the last constrainted one do not. I very appreciate if you can give me an example for how to impose the proper equality constraints in my case.
Wen-I Chuang

Posts: 3
Joined: Mon Feb 21, 2022 9:43 pm

### Re: Non-linear systems estimation with equality constraints

The original method is correct---you just have to pick the standard errors off the actually estimated version.

You would have to write the == method using separate pairs, that is, b11==d11 b11==f11 b11==h11. Note that they will not be exactly equal, just approximately, as they are being estimated separately and are merely approaching equality.
TomDoan

Posts: 7385
Joined: Wed Nov 01, 2006 5:36 pm

### Re: Non-linear systems estimation with equality constraints

Dear Tom,

Thank you again for your prompt reply to my inquiry. Following your instruction, I have obtained the output that looks good and makes sense. As you expect, the estimated constrainted coefficients are approximately equal. I very appreciate for your kind helps.

Best, Wen-I
Wen-I Chuang

Posts: 3
Joined: Mon Feb 21, 2022 9:43 pm