Beginning in SAS 9, PROC QLIM can model systems of equations involving one or more discrete or limited dependent variables. This includes systems of equations models involving probit equations, and equations with censoring or truncation. Logit equations are not included since only normal distribution is currently supported for multivariate models. By default, PROC QLIM estimates systems of equations using joint maximum likelihood of multivariate normal distribution. For sample selection model with one probit selection equation and one main equation with linear continuous dependent variable with or without censoring or truncation, Heckman's two step estimation method is also supported with the HECKIT option.
For models with discrete and/or limited endogenous regressors, you can use PROC QLIM to estimate joint maximum likelihood of the dependent variable and the endogenous variables to address endogeneity. For more detailed discussion on this topic, see this note.
Following is an example illustrating how to model a system of two equations where the dependent variable is continuous in one equation and discrete in the other. The first equation has discrete dependent variable Y1, and the second equation has continuous dependent variable Y2. The error terms for the two equations follow a bivariate normal distribution with correlation coefficient ρ. X1 and X2 are the independent variables for the Y1 equation. X1 and X3 are the independent variables for the Y2 equation.
The following statements save the data to be modeled in data set A.
data a;
input x1 x2 x3 y2 y1;
datalines;
0.17497 0.64197 -1.45663 4.8817 1
0.11459 -3.43425 0.40230 2.7661 0
-0.74524 -0.91216 0.69787 -0.7624 0
0.04622 0.17980 -0.76145 4.8771 1
-2.03811 -0.35198 0.42115 -7.0241 0
0.44059 -0.95091 1.02964 3.3445 1
1.64176 -0.20746 1.14139 8.0826 1
-0.26957 -0.41252 -0.48587 2.3853 0
-0.62631 -0.42974 0.16298 1.7557 0
-0.21549 0.38791 0.58652 1.1250 1
-0.85734 0.41021 -0.47097 0.3410 0
-0.62377 1.11432 -2.34148 3.4286 1
-1.28489 1.48283 0.17826 -1.9455 1
-1.54905 0.82510 -0.37865 -2.7149 0
-0.28610 -0.89867 -0.55864 2.2514 0
-0.13706 -0.54289 0.19579 0.8071 0
0.11438 -2.59509 0.42313 4.4278 0
-1.71224 -0.33965 1.16644 -4.6856 0
-0.50619 -0.05429 -0.80309 2.7559 1
-0.19950 -0.44462 -0.24632 2.3115 0
1.73989 -0.42086 -1.15367 14.1921 1
0.07015 -0.74634 0.82207 3.8338 1
-1.52402 0.07462 0.78615 -4.4528 0
-0.95124 -0.48518 -1.50249 1.6049 0
1.30570 -0.15536 -1.28473 11.1813 1
0.28962 -0.20968 1.07641 2.2266 1
-1.71088 0.58859 0.90467 -6.6041 1
0.49057 0.79216 -1.28886 9.0069 1
0.80224 0.14366 -0.43947 5.3633 1
-0.95248 1.80740 -0.47225 0.5167 1
0.40776 -0.39486 1.35106 2.1436 1
0.40546 0.03781 1.04494 3.6882 1
-0.12599 -0.34989 -1.61652 6.0027 1
1.92708 0.68649 0.60637 10.7007 1
-1.25944 1.27604 0.59649 -2.3912 1
2.36948 0.00699 1.69571 8.0344 1
-1.21057 -0.81958 0.81773 -3.8683 0
0.01658 -0.24241 0.48201 1.9963 1
-0.53230 0.06703 -1.17613 2.8910 1
-0.53373 -0.02477 -1.55429 3.6301 1
0.53495 0.25293 -0.15437 6.5103 1
1.90986 -0.34738 0.79705 7.9248 1
1.52116 -0.95351 0.26888 8.0098 1
0.55889 -0.53843 -1.86157 9.7185 0
1.50916 0.49419 -0.46831 9.4553 1
-1.46087 -0.07898 -0.89582 0.3144 0
0.24987 -0.19039 -0.52448 3.3765 1
-0.64936 0.99461 0.14878 -0.2668 1
-0.49936 0.70900 2.62552 -4.2624 1
-0.83128 0.96268 -1.55989 3.1518 1
1.24245 0.54855 -1.82439 10.5989 1
-0.93816 -0.79537 -0.71056 1.1898 0
0.30903 -1.62362 -0.39664 5.2802 0
0.85120 0.70481 -0.23251 6.6368 1
-1.00963 -1.45032 0.82021 -2.7223 0
1.42463 0.24378 0.58140 6.7413 1
0.17977 -1.22253 -0.50328 5.0712 0
0.58149 -0.23501 0.11656 5.5987 1
-1.69800 0.11900 0.14093 -5.0092 1
-0.73714 0.01091 -0.89815 2.6271 0
1.37565 -1.68193 -0.28471 8.5968 0
0.53728 0.37277 1.17228 2.0579 1
-0.35974 0.35814 -2.17620 6.6793 1
-0.74655 -0.29407 0.28896 -2.0744 1
0.40987 1.02620 0.47847 3.0734 1
0.87022 -2.05801 -0.87866 6.4308 0
-0.52504 -0.24030 -1.10027 1.8237 1
1.66849 0.45740 0.18920 8.5959 1
1.07478 -0.13627 0.79774 5.9628 1
0.59802 -0.95000 -1.88930 11.2539 1
0.82342 0.38449 -0.43925 8.0402 1
-0.86616 0.90126 0.11636 -0.1060 1
0.67762 1.72554 -0.52652 5.3114 1
-0.41441 -0.13897 -0.60744 1.1838 0
0.69039 -1.53218 0.47124 3.9103 0
-0.47571 0.00107 0.77325 -0.4087 0
1.81107 0.40526 0.26101 10.1988 1
-0.27665 1.33477 -0.86346 3.6644 1
2.05955 -0.36836 0.46144 8.6102 1
0.65575 -0.27587 -1.04840 8.6610 1
-0.64217 0.66742 -0.70026 2.5064 1
0.44746 0.67109 -0.91117 5.7005 1
-0.64736 -1.05139 -1.91916 5.0319 0
0.25011 1.36608 0.25637 4.0518 1
-0.01103 1.43319 -0.93497 4.2071 1
0.92784 -0.71976 0.05531 5.5593 0
0.75525 -0.11731 0.86833 2.6656 1
-0.14225 -0.20254 0.30008 1.3160 0
0.82005 0.87674 0.06165 5.1769 1
-1.12135 -0.14030 -0.81776 1.0114 0
1.36111 0.71688 1.90380 5.0331 1
-1.04078 -0.22317 -1.43246 2.4721 1
0.71224 -0.07469 -0.54699 8.1164 1
-0.67400 -1.55367 -0.55392 0.9329 0
-0.88710 1.10458 -0.29560 0.7002 1
0.98903 1.24271 -1.61256 11.2676 1
-0.85549 1.38882 1.21726 -3.8498 1
-0.81942 -0.68282 0.17537 -1.6079 0
1.92033 0.21387 1.22180 7.5592 1
0.22177 1.16527 -1.47982 7.7934 1
;
To specify the two equations, use two MODEL statements in PROC QLIM. For the discrete equation, the DISCRETE option in the MODEL statement indicates that the dependent variable in this equation is discrete. No option is needed to specify a continuous dependent variable such as Y2.
proc qlim data = a;
model y1 = x1 x2 / discrete;
model y2 = x1 x3;
run;
Following are the parameter estimates of the model estimated by PROC QLIM.
For systems of equations, the parameters in the main equation have format y.x, where y is the name of the dependent variable, and x is the name of the independent variable. _Sigma.y2 is the estimated standard deviation of the error term for the Y2 equation. For a discrete equation, such as the Y1 equation, the error term follows standard normal distribution, so the standard deviation is always 1 and no _Sigma.y1 is estimated. The _Rho estimate is the correlation between the two error terms.