Published on :
Statistical CREATION_INTERNE

Example 4 for PROC NLIN: Influence of Parameterization on Curvature

This code is also available in: Deutsch Español Français
Awaiting validation
The program begins by creating a 'logistic' dataset simulating a dose-response relationship. It then uses the NLIN procedure to fit a log-logistic model using three different parameterizations. The objective is to show how the choice of parameters influences measures of nonlinearity (such as Hougaard's bias) and the reliability of confidence intervals.
Data Analysis

Type : CREATION_INTERNE


The data is generated directly in the code via a DATA step and DATALINES statements.

1 Code Block
DATA STEP Data
Explanation :
Creation of the 'logistic' dataset containing the 'dose' and 'y' variables, as well as a logarithmic transformation of the dose.
Copied!
1DATA logistic;
2 INPUT dose y;
3 logdose = log(dose);
4 DATALINES;
50.009 106.56
60.035 94.12
70.07 89.76
80.15 60.21
90.20 39.95
100.28 21.88
110.50 7.46
12;
2 Code Block
PROC SGPLOT
Explanation :
Graphical visualization of the data as a scatter plot with a logarithmic scale on the x-axis.
Copied!
1PROC SGPLOT DATA=logistic;
2 scatter y=y x=dose;
3 xaxis type=log logstyle=linear;
4RUN;
3 Code Block
PROC NLIN
Explanation :
First adjustment of the nonlinear model with parameters alpha, beta, and gamma. The 'bias', 'hougaard', and 'nlinmeasures' options request diagnostics on nonlinearity and parameter bias.
Copied!
1PROC NLIN DATA=logistic bias hougaard nlinmeasures;
2 parameters alpha=100 beta=3 gamma=300;
3 delta = 0;
4 Switch = 1/(1+gamma*exp(beta*log(dose)));
5 model y = delta + (alpha - delta)*Switch;
6RUN;
4 Code Block
PROC NLIN Data
Explanation :
Second adjustment with a reparameterization replacing gamma with LD50 (lethal dose 50%). This formulation is often more interpretable. Predicted results are saved in the 'nlinout' table.
Copied!
1PROC NLIN DATA=logistic bias hougaard;
2 parameters alpha=100 beta=3 LD50=0.15;
3 delta = 0;
4 Switch = 1/(1+exp(beta*log(dose/LD50)));
5 model y = delta + (alpha - delta)*Switch;
6 OUTPUT out=nlinout pred=p lcl=lcl ucl=ucl;
7RUN;
5 Code Block
PROC NLIN Data
Explanation :
Third adjustment with another reparameterization using 'mustar' (predicted value at a fixed dose xstar). This approach aims to further reduce the nonlinearity of the parameters.
Copied!
1PROC NLIN DATA=logistic bias hougaard nlinmeasures;
2 parameters alpha=100 mustar=20 LD50=0.15;
3 delta = 0;
4 xstar = 0.3;
5 beta = log((alpha - mustar)/(mustar - delta)) / log(xstar/LD50);
6 Switch = 1/(1+exp(beta*log(dose/LD50)));
7 model y = delta + (alpha - delta)*Switch;
8 OUTPUT out=nlinout pred=p lcl=lcl ucl=ucl;
9RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : SAS SAMPLE LIBRARY