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

# st: AW: Error r(303) when using the constraint command

 From "Martin Weiss" To Subject st: AW: Error r(303) when using the constraint command Date Thu, 1 Apr 2010 22:38:07 +0200

```<>

Could be a precision issue, which you can check via

*************
forval c=1/6 {
loc cc=(`c'-1)/10
local athrho=1/2*ln((1+`cc')/(1-`cc'))
const `c' [athrho]_cons=`athrho'
}

constr l _all
*************

See NJC`S recent SJ column
http://www.stata-journal.com/article.html?article=pr0051...

HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Roy, Manan
Gesendet: Donnerstag, 1. April 2010 22:34
An: statalist@hsphsun2.harvard.edu
Betreff: st: Error r(303) when using the constraint command

Hi Everybody,

I am estimating a biprobit model, and I intend to impose different
constraints.
So, I am using a loop to create the different constraints, and then using
these one by one.
I am using STATA 11.

Here is what I do:

forval c=1/6 {
loc cc=(`c'-1)/10
local athrho=1/2*ln((1+`cc')/(1-`cc'))
const `c' [athrho]_cons=`athrho'
}
* constrained biprobit regression
forval c=1/6 {
biprobit (y = d `xvars') (d = `xvars'), const(`c')
estimates store m`c'
}

The output looks like this:

Fitting comparison equation 1:
(note: constraint number 1 caused error r(303))
Iteration 0:   log likelihood = -3954.7171
Iteration 1:   log likelihood = -3696.4398
Iteration 2:   log likelihood = -3694.1082
Iteration 3:   log likelihood = -3694.1066
Iteration 4:   log likelihood = -3694.1066
Fitting comparison equation 2:
(note: constraint number 1 caused error r(303))
Iteration 0:   log likelihood = -5355.7337
Iteration 1:   log likelihood = -3064.5305
Iteration 2:   log likelihood = -3029.2813
Iteration 3:   log likelihood = -3028.7581
Iteration 4:   log likelihood = -3028.7373
Iteration 5:   log likelihood = -3028.7367
Iteration 6:   log likelihood = -3028.7366
Iteration 7:   log likelihood = -3028.7366
Comparison:    log likelihood = -6722.8432
Fitting full model:
Iteration 0:   log likelihood = -6722.8432
Iteration 1:   log likelihood = -6722.8432
Seemingly unrelated bivariate probit              Number of obs   =
7876
Wald chi2(65)   =
3414.42
Log likelihood = -6722.8432                       Prob > chi2     =
0.0000
( 1)  [athrho]_cons = 0
----------------------------------------------------------------------------
--
|      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
y    |
d |    .122906   .0459438     2.68   0.007     .0328578    .2129543
white |   -.323308   .0415659    -7.78   0.000    -.4047757
-.2418402
black |  -.5275627   .0502684   -10.49   0.000    -.6260869
-.4290385
age |  -.0808872   .0085189    -9.49   0.000     -.097584
-.0641904
male |   .0592134   .0332836     1.78   0.075    -.0060212
.124448
ses2q |   -.106484   .0545631    -1.95   0.051    -.2134256
.0004576
ses3q |   -.035802   .0688905    -0.52   0.603     -.170825
.099221
ses4q |   .0479943   .0871346     0.55   0.582    -.1227864
.218775
ses5q |   .0798271    .109375     0.73   0.465    -.1345441
.2941982
wicprg1 |   .2439878   .0522145     4.67   0.000     .1416492
.3463264
wicprgmiss1 |   .2532862   .0587658     4.31   0.000     .1381074
.3684651
mwest |   .0170592   .0561952     0.30   0.761    -.0930814
.1271999
south |   -.056428   .0524807    -1.08   0.282    -.1592882
.0464323
west |   .0576014   .0564434     1.02   0.307    -.0530256
.1682284
urbana |  -.1209286    .050942    -2.37   0.018    -.2207731
-.021084
urbanc |  -.0427388   .0635592    -0.67   0.501    -.1673125
.0818349
hhsize |   .0392937   .0115417     3.40   0.001     .0166724
.061915
momage |  -.0124046   .0031431    -3.95   0.000     -.018565
-.0062442
momagemiss |  -.5772956   .4423098    -1.31   0.192    -1.444207
.2896156
mltHS |  -.6551118   .4854976    -1.35   0.177     -1.60667
.296446
mHS |  -.5745211   .4857891    -1.18   0.237     -1.52665
.377608
msmcoll |  -.5292191   .4874029    -1.09   0.278    -1.484511
.426073
mBA |  -.4779349   .4903919    -0.97   0.330    -1.439085
.4832156
mgtBA |  -.3893851   .4937717    -0.79   0.430     -1.35716
.5783897
dltHS |   .0680494    .103982     0.65   0.513    -.1357517
.2718505
dHS |   .1241534   .1038614     1.20   0.232    -.0794112
.327718
dsmcoll |   .1102334   .1087275     1.01   0.311    -.1028686
.3233354
dBA |   .1891118   .1202023     1.57   0.116    -.0464804
.4247039
dgtBA |   .2779827   .1305615     2.13   0.033     .0220868
.5338786
married |   .1083885   .0435551     2.49   0.013     .0230221
.1937548
marriedmiss |  -.9089542   .5813536    -1.56   0.118    -2.048386
.230478
momwt |   .0020479   .0009942     2.06   0.039     .0000993
.0039965
momwtmiss |  -.0398787   .0420232    -0.95   0.343    -.1222427
.0424853
_cons |   2.118674   .5120097     4.14   0.000     1.115154
3.122195
-------------+--------------------------------------------------------------
--
d        |
white |   .1507245   .0454241     3.32   0.001      .061695
.2397541
black |   .0263325   .0554181     0.48   0.635     -.082285
.13495
age |  -.0235513   .0096604    -2.44   0.015    -.0424852
-.0046173
male |  -.0531481   .0366683    -1.45   0.147    -.1250167
.0187204
ses2q |   .5323748   .0585236     9.10   0.000     .4176707
.6470789
ses3q |   .8612891   .0709974    12.13   0.000     .7221368
1.000442
ses4q |   1.112707   .0889857    12.50   0.000      .938298
1.287115
ses5q |   1.722265   .1247021    13.81   0.000     1.477853
1.966676
wicprg1 |  -.4686316   .0510844    -9.17   0.000    -.5687551
-.3685081
wicprgmiss1 |   .7060422   .0581189    12.15   0.000     .5921313
.8199531
mwest |   -.103406   .0626162    -1.65   0.099    -.2261314
.0193195
south |  -.3248504   .0581562    -5.59   0.000    -.4388344
-.2108663
west |  -.0936663   .0614129    -1.53   0.127    -.2140334
.0267008
urbana |   .1457413   .0551406     2.64   0.008     .0376677
.2538149
urbanc |   .0162414   .0681164     0.24   0.812    -.1172643
.1497471
hhsize |  -.0471504    .012168    -3.87   0.000    -.0709992
-.0233015
momage |   .0201872    .003363     6.00   0.000     .0135959
.0267784
momagemiss |   .1690383   .5073341     0.33   0.739    -.8253182
1.163395
mltHS |   .3119018    .551964     0.57   0.572    -.7699278
1.393731
mHS |   .4489505   .5516901     0.81   0.416    -.6323423
1.530243
msmcoll |    .360441   .5532024     0.65   0.515    -.7238157
1.444698
mBA |   .3210744   .5568311     0.58   0.564    -.7702944
1.412443
mgtBA |   .3835983   .5641698     0.68   0.497    -.7221542
1.489351
dltHS |   .4367679   .1312863     3.33   0.001     .1794514
.6940843
dHS |   .4892686   .1301381     3.76   0.000     .2342027
.7443346
dsmcoll |    .415516   .1333935     3.11   0.002     .1540696
.6769625
dBA |   .3870684    .146481     2.64   0.008      .099971
.6741658
dgtBA |   .3365731   .1647762     2.04   0.041     .0136177
.6595284
married |   .4619601   .0426267    10.84   0.000     .3784133
.545507
marriedmiss |  -4.761327   242.2242    -0.02   0.984    -479.5121
469.9894
momwt |   .0003644   .0010888     0.33   0.738    -.0017697
.0024985
momwtmiss |   .0656976   .0464471     1.41   0.157    -.0253371
.1567322
_cons |  -1.816991    .583467    -3.11   0.002    -2.960565
-.6734167
-------------+--------------------------------------------------------------
--
/athrho |  (omitted)
-------------+--------------------------------------------------------------
--
rho |  (omitted)
----------------------------------------------------------------------------
--

I get this warning for all the 6 constraints: (note: constraint number n
caused error r(303)); n=1,2, ..., 6

Thanks,

Manan

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```