I have two variables. Independent Variable: ALT; and dependent variable: IL.
I would like to fit the following nonlinear model -> IL = 100 * (1-exp (-c * ALT)). I was using the following procedure:
PROC NLIN DATA=TEST METHOD=DUD;
PARAMETERS c=0.036;
MODEL IL=100*(1-exp(-c*ALT));
RUN;
However, as can be seen from the figure below, the data variance is heterogeneous:
What procedure to use to fit the model considering heterogeneous variance?
Thanks for your help.
Quantile regression, as suggested by @Ksharp is a great idea. But it can't fit general non-linear relationships. You can turn your problem into a linear one by fitting
log(1-IL/100) = -c*ALT
by quantile regression. Do this by defining the new variable Z = log(1-IL/100) in a new dataset and fit with
model Z = ALT;
in proc quantreg.
Please tell us if this worked. Good luck!
Thank you for your response @Ksharp and @PGStats .
I know that you mean, but I would like to fit nonlinear models that same form which Littel (2006) show in your book with linear models. For example, for to fit heterogenous variance in linear models, he use an variance function for the following linear model: y = a + bx; with followling procedure:
proc nlmixed data=LR;
parms a=4.5 b=7.5 c=.01 sig2=5;
mean = a+b*x;
model y ~ normal(mean,sig2*exp(c*x));
predict mean out=mean df=16;
run;
The variance function is Var = σ²exp{xγ};
where σ² = sig² and γ = c.
I would like to know if I could use this same procedure for nonlinear models. And what function of variance could I use in place of σ²exp{xγ}.
REFERENCE
Littell, Ramon C., George A. Milliken, Walter W. Stroup, Russell D. Wolfinger, and Oliver Schabenberger. 2006. SAS® for Mixed Models, Second Edition. Cary, NC: SAS Institute Inc.
proc nlmixed is for MIXED model. But yours is GLM .
I think you could try PROC GENMOD , in which you can customize variance function or marginal distribution.
or @Rick_SAS might have some good ideas .
Personally, I'd follow the advice of @PGStats . If the problem did not easily transform to a linear model, I'd use iterative reweighted least squares in PROC NLIN. There is an example in the doc that shows how to use the _WEIGHT_ variable to handle heteroskedastic data.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.