CQLIM Procedure
Example 12.2 Bivariate Probit Analysis
This example shows how to estimate a bivariate probit model by using a large data table.
The following DATA step generates a data set that contains 1 million observations from a bivariate probit model:
data bivariate_probit;
call streaminit(19283);
keep y1 y2 x1 x2;
do i = 1 to 1000000;
x1 = rand('NORMAL', 0, 1);
x2 = rand('NORMAL', 0, 1);
u1 = rand('NORMAL', 0, 1);
u2 = rand('NORMAL', 0, 1);
y1l = 1 + 2 * x1 + 3 * x2 + u1;
y2l = 3 + 4 * x1 - 2 * x2 + u1 * 0.2 + u2;
if y1l > 0 then y1 = 1;
else y1 = 0;
if y2l > 0 then y2 = 1;
else y2 = 0;
output;
end;
run;
You can load the data set bivariate_probit into a data table in your session that is associated with the mylib libref. The DATA step assumes that your libref is named mylib, but you can substitute any appropriately defined libref.
data mylib.bivariate_probit;
set bivariate_probit;
run;
The following statements estimate a bivariate probit model. Note that the INIT statement in the SAS program sets the initial values for some parameters in the optimization. The METHOD=QN option specifies the quasi-Newton optimization algorithm.
proc cqlim data = mylib.bivariate_probit method = qn;
init y1.x1 = 2.8, y1.x2 = 2.1, _rho = 0.1;
model y1 = x1 x2 / discrete;
model y2 = x1 x2 / discrete;
run;
Output 12.2.1 shows the estimation results for the bivariate probit model. The "Discrete Response Profile" tables show the response profile for the variables and
.
Output 12.2.1: Bivariate Probit Analysis Results
| Discrete Response Profile of y1 | ||
|---|---|---|
| Index | Value | Total Frequency |
| 1 | 0 | 394734 |
| 2 | 1 | 605266 |
| Discrete Response Profile of y2 | ||
|---|---|---|
| Index | Value | Total Frequency |
| 1 | 0 | 256241 |
| 2 | 1 | 743759 |
| Model Fit Summary | |
|---|---|
| Dependent Variable | y1 y2 |
| Number of Observations | 1000000 |
| Data Set | BIVARIATE_PROBIT |
| Log Likelihood | -313821 |
| Maximum Absolute Gradient | 0.058932 |
| Number of Iterations | 17 |
| Optimization Method | Quasi-Newton |
| AIC | 627656.7 |
| SBC | 627739.4 |
| Covariance Estimation | Hessian |
| Convergence criterion (FCONV=1E-11) satisfied. |
| Parameter Estimates | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | t Value | Approx Pr > |t| |
| y1.Intercept | 1 | 1.003233 | 0.003077 | 326.02 | <.0001 |
| y1.x1 | 1 | 2.004488 | 0.004805 | 417.20 | <.0001 |
| y1.x2 | 1 | 3.001878 | 0.006719 | 446.77 | <.0001 |
| y2.Intercept | 1 | 2.944550 | 0.007710 | 381.92 | <.0001 |
| y2.x1 | 1 | 3.924242 | 0.010270 | 382.09 | <.0001 |
| y2.x2 | 1 | -1.962626 | 0.005678 | -345.65 | <.0001 |
| _Rho | 1 | 0.194474 | 0.006278 | 30.98 | <.0001 |