The NLIN Procedure

Example 88.6 ODS Graphics and Diagnostics

(View the complete code for this example.)

The model in this example, taken from St. Laurent and Cook (1993), shows an unusual behavior in that the intrinsic curvature is substantially larger than the parameter-effects curvature. This example demonstrates how the diagnostics features of PROC NLIN can be used to perform postconvergence diagnostics.

The model takes the form

normal upper E left-bracket upper Y vertical-bar x 1 comma x 2 right-bracket equals alpha x 1 plus exp left-brace gamma x 2 right-brace

The following DATA step creates a small data set to be used in this example:

data contrived;
   input x1 x2 y;
   datalines;
-4.0   -2.5  -10.0
-3.0   -2.0   -5.0
-2.0   -1.5   -2.0
-1.0   -1.0   -1.0
 0.0    0.0    1.5
 1.0    1.0    4.0
 2.0    1.5    5.0
 3.0    2.0    6.0
 4.0    2.5    7.0
-3.5   -2.2   -7.1
-3.5   -1.7   -5.1
 3.5    0.7    6.1
 2.5    1.2    7.5
;

The model is fit with the following statements in the NLIN procedure:

ods graphics on;
proc nlin data=contrived bias hougaard
        NLINMEASURES plots(stats=all)=(diagnostics);
   parms alpha=2.0
         gamma=0.0;
   model y = alpha*x1 + exp(gamma*x2);
run;
ods graphics off;

Figure 26: Bias, Skewness, and Global Nonlinearity Measures

The NLIN Procedure

Parameter Estimate Approx
Std Error
Approximate 95% Confidence
Limits
Skewness Bias Percent
Bias
alpha 1.9378 0.4704 0.9024 2.9733 6.6491 0.5763 29.7
gamma 0.0718 0.7923 -1.6720 1.8156 -7.5596 -0.9982 -1390

Global Nonlinearity Measures
Max Intrinsic Curvature 6.6007
RMS Intrinsic Curvature 4.0421
Max Parameter-Effects Curvature 3.5719
RMS Parameter-Effects Curvature 2.1873
Curvature Critical Value 0.5011
Raw Residual Variance 2.1722
Projected Residual Variance 1.4551


The bias, skewness, and both the maximum and RMS intrinsic curvatures, compared to the critical curvature value, show that the model is highly nonlinear (Figure 26). As such, performing diagnostics with the raw residuals can be problematic because they might have undesirable statistical properties: a nonzero mean and a negative semidefinite (instead of zero) covariance with the predicted values and different variances. In addition, the use of tangential leverage is questionable in this case.

The partial results from this NLIN run are shown in Output 88.6.1, Output 88.6.2, and Output 88.6.3. The diagnostics plots corroborate the previously mentioned expectations: highly correlated raw residuals (with the predicted values), significant differences between tangential and Jacobian leverages and projected residuals which overcome some of the shortcomings of the raw residuals. Finally, considering the large intrinsic curvature, reparameterization might not make the model close-to-linear, perhaps necessitating the construction of another model.

Output 88.6.1: Diagnostics Panel

Diagnostics Panel


Output 88.6.2: Leverage Plots

Leverage Plots


Output 88.6.3: Local Influence Plot

Local Influence Plot


Last updated: December 09, 2022