CQLIM Procedure

Example 12.1 Model with Censoring

This example uses the CQLIM procedure to process a large data table.

The following DATA step generates a data set that contains 5 million observations from a censored model. The model contains seven variables.

data simulate;
   call streaminit(12345);
   array vars x1-x7;
   array parms{7}  (3 4 2 4 -3 -5 -3);
   intercept = 2;
   do i = 1 to 5000000;
      sum_xb = 0;
      do j = 1 to 7;
         vars[j] = rand('NORMAL', 0, 1);
         sum_xb = sum_xb + parms[j] * vars[j];
      end;
      y = intercept + sum_xb + 100 * rand('NORMAL', 0, 1);
      if y > 400 then y = 400;
      if y < 0   then y = 0;
      output;
   end;
keep y x1-x7;
run;

You can load the data set simulate 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.simulate;
   set simulate;
run;

The following statements estimate a censored model:

proc cqlim data = mylib.simulate;
   model y = x1-x7 / censored(lb = 0 ub = 400);
run;

Output 12.1.1 shows the estimation results for the censored model. The "Model Fit Summary" table shows detailed information about the model. All parameter estimates in the "Parameter Estimates" table are highly significant and correspond to their theoretical values that were set during the data generating process.

Output 12.1.1: Censored Model: Summary

The CQLIM Procedure

Summary Statistics of Continuous Responses
VariableMeanStandard
Error
TypeLower
Bound
Upper
Bound
N Obs
Lower Bound
N Obs
Upper Bound
y41.1116859.338269Censored0400246E4189

Model Fit Summary
Dependent Variabley
Number of Observations5000000
Data SetSIMULATE
Log Likelihood-1.702E7
Maximum Absolute Gradient1.806E-9
Number of Iterations7
Optimization MethodNewton-Raphson
AIC34043697
SBC34043817
Covariance EstimationHessian

Convergence criterion (FCONV=1E-11) satisfied.


Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Intercept12.0452430.05468937.40<.0001
x113.0218250.04934861.23<.0001
x214.0069870.04934581.20<.0001
x311.9557600.04932739.65<.0001
x414.0454030.04933881.99<.0001
x51-3.0203390.049310-61.25<.0001
x61-5.0416500.049351-102.16<.0001
x71-2.9505100.049362-59.77<.0001
_Sigma1100.0150570.0493352027.25<.0001


Last updated: July 09, 2026