CQLIM Procedure
Getting Started: CQLIM Procedure
This example illustrates the use of the CQLIM procedure. The data were originally published by Mroz (1987), and the following DATA steps load a subset of the data. The assumption here is that your libref is named mylib, but you can substitute any appropriately defined libref.
title1 'Estimating a Tobit Model';
data subset;
input Hours Yrs_Ed Yrs_Exp @@;
datalines;
0 8 9 0 8 12 0 9 10 0 10 15 0 11 4 0 11 6
1000 12 1 1960 12 29 0 13 3 2100 13 36
3686 14 11 1920 14 38 0 15 14 1728 16 3
1568 16 19 1316 17 7 0 17 15
;
data mylib.subset;
set subset;
run;
In these data, Hours is the number of hours that a wife worked outside the household in a particular year, Yrs_Ed is years of education, and Yrs_Exp is years of work experience.
From the nature of the data, it is clear that there are a number of women who committed some positive number of hours to outside work ( is observed). There are also a number of women who did not work outside the household at all (
is observed). This yields the following model,
where and
denotes the set of explanatory variables. The following statements fit a Tobit model to the number of hours worked, with years of education and years of work experience as covariates:
/*-- Tobit Model --*/
proc cqlim data=mylib.subset;
model hours = yrs_ed yrs_exp;
endogenous hours ~ censored(lb=0);
run;
The output of the CQLIM procedure is shown in Figure 1.
Figure 1: Tobit Analysis Results
| Estimating a Tobit Model |
| Model Fit Summary | |
|---|---|
| Dependent Variable | Hours |
| Number of Observations | 17 |
| Data Set | SUBSET |
| Log Likelihood | -74.937 |
| Maximum Absolute Gradient | 6.748E-6 |
| Number of Iterations | 5 |
| Optimization Method | Newton-Raphson |
| AIC | 157.874 |
| SBC | 161.2069 |
| Covariance Estimation | Hessian |
| Convergence criterion (ABSGCONV=0.00001) satisfied. |
| Parameter Estimates | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error | t Value | Approx Pr > |t| |
| Intercept | 1 | -5595.665232 | 27.645559 | -202.41 | <.0001 |
| Yrs_Ed | 1 | 372.981321 | 53.962540 | 6.91 | <.0001 |
| Yrs_Exp | 1 | 63.319498 | 36.536554 | 1.73 | 0.0831 |
| _Sigma | 1 | 1582.240492 | 389.785175 | 4.06 | <.0001 |
The "Parameter Estimates" table contains four rows. The first three rows correspond to the vector estimate of the regression coefficients . The last row is called _Sigma, which corresponds to the estimate of the error variance
.