NLMOD Procedure

Binomial Model

(View the complete code for this example.)

In the example "Probit Model with Likelihood Function" in the chapter "The NLIN Procedure" in SAS/STAT User's Guide, cancer remission is modeled by expressing the maximum likelihood function for a binary distribution as a nonlinear least squares optimization. The following statements show an equivalent formulation of this model that uses PROC NLMOD and specifies the binary distribution explicitly:

data mylib.Remiss;
   input remiss cell smear infil li blast temp;
   label remiss = 'complete remission';
   like = 0;
   label like = 'dummy variable for nlin';
   datalines;
 1 0.8  .83 .66 1.9 1.10   .996
 1 0.9  .36 .32 1.4 0.74   .992
 0 0.8  .88 .70 0.8 0.176  .982
 0 1    .87 .87 0.7 1.053  .986
 1 0.9  .75 .68 1.3 0.519  .980
 0 1    .65 .65 0.6 0.519  .982
 1 0.95 .97 .92 1   1.23   .992
 0 0.95 .87 .83 1.9 1.354 1.020
 0 1    .45 .45 0.8 0.322  .999
 0 0.95 .36 .34 0.5 0     1.038
 0 0.85 .39 .33 0.7 0.279  .988
 0 0.7  .76 .53 1.2 0.146  .982
 0 0.8  .46 .37 0.4 0.38  1.006
 0 0.2  .39 .08 0.8 0.114  .990
 0 1    .90 .90 1.1 1.037  .990
 1 1    .84 .84 1.9 2.064 1.020
 0 0.65 .42 .27 0.5 0.114 1.014
 0 1    .75 .75 1   1.322 1.004
 0 0.5  .44 .22 0.6 0.114  .990
 1 1    .63 .63 1.1 1.072  .986
 0 1    .33 .33 0.4 0.176 1.010
 0 0.9  .93 .84 0.6 1.591 1.020
 1 1    .58 .58 1   0.531 1.002
 0 0.95 .32 .30 1.6 0.886  .988
 1 1    .60 .60 1.7 0.964  .990
 1 1    .69 .69 0.9 0.398  .986
 0 1    .73 .73 0.7 0.398  .986
 ;
proc nlmod data=mylib.Remiss corr;
   parms int=-10 a=-2 b=-1 c=6;
   linp = int + a*cell + b*li + c*temp;
   p = probnorm(linp);
   model remiss ~ binary(1-p);
run;

This binary distribution model displays information about the quality of the estimation that is different from the information displayed in the section Least Squares Model. No analysis of variance table is produced for this model; fit statistics based on the value of the likelihood function are displayed in Figure 3.

Figure 3: Nonlinear Likelihood Function Statistics

The NLMOD Procedure

Fit Statistics
-2 Log Likelihood21.9002
AIC (smaller is better)29.9002
AICC (smaller is better)31.7183
BIC (smaller is better)35.0835


Parameter estimates for the binary distribution model that uses the same quantities as in the section Least Squares Model are displayed in Figure 4.

Figure 4: Parameter Estimates and Approximate 95% Confidence Intervals

Parameter Estimates
ParameterEstimateStandard
Error
DFt ValueApprox
Pr > |t|
Approximate 95% Confidence
Limits
LowerUpper
int-36.754832.360727-1.140.2660-103.229.6439
a-5.62984.637627-1.210.2353-15.14543.8858
b-2.25130.979027-2.300.0294-4.2599-0.2426
c45.181534.9095271.290.2065-26.4469116.8


Last updated: September 22, 2026