The 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 into CAS. The assumption here is that your CAS engine libref is named mycas, but you can substitute any appropriately defined CAS engine libref.

title1 'Estimating a Tobit Model';

data subset;
   input Hours Yrs_Ed Yrs_Exp @@;
   if Hours eq 0 then Lower=.;
      else               Lower=Hours;
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 mycas.subset(copies=1 promote=yes);
   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=mycas.subset;
   model hours = yrs_ed yrs_exp;
   endogenous hours ~ censored(lb=0);
run;

The output of the CQLIM procedure is shown in Figure 10.1.

Figure 10.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 . The last row is called _Sigma, which corresponds to the estimate of the error variance .

Last updated: June 14, 2018