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 (y Subscript i Baseline greater-than 0 is observed). There are also a number of women who did not work outside the household at all (y Subscript i Baseline equals 0 is observed). This yields the following model,

y Subscript i Superscript asterisk Baseline equals bold x prime Subscript i Baseline bold-italic beta plus epsilon Subscript i
y Subscript i Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column y Subscript i Superscript asterisk Baseline 2nd Column normal i normal f y Subscript i Superscript asterisk Baseline greater-than 0 2nd Row 1st Column 0 2nd Column normal i normal f y Subscript i Superscript asterisk Baseline less-than-or-equal-to 0 EndLayout

where epsilon Subscript i Baseline tilde Overscript normal i normal i normal d Endscripts upper N left-parenthesis 0 comma sigma squared right-parenthesis and bold x Subscript i 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

The CQLIM Procedure

Model Fit Summary
Dependent VariableHours
Number of Observations17
Data SetSUBSET
Log Likelihood-74.937
Maximum Absolute Gradient6.748E-6
Number of Iterations5
Optimization MethodNewton-Raphson
AIC157.874
SBC161.2069
Covariance EstimationHessian

Convergence criterion (ABSGCONV=0.00001) satisfied.


Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept1-5595.66523227.645559-202.41<.0001
Yrs_Ed1372.98132153.9625406.91<.0001
Yrs_Exp163.31949836.5365541.730.0831
_Sigma11582.240492389.7851754.06<.0001


The "Parameter Estimates" table contains four rows. The first three rows correspond to the vector estimate of the regression coefficients bold-italic beta. The last row is called _Sigma, which corresponds to the estimate of the error variance sigma.

Last updated: July 09, 2026