BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vitormacedo
Calcite | Level 5

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:

SGPlot.png

 

What procedure to use to fit the model considering heterogeneous variance?

 

Thanks for your help.

1 ACCEPTED SOLUTION
5 REPLIES 5
PGStats
Opal | Level 21

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!

PG
vitormacedo
Calcite | Level 5

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.

Ksharp
Super User

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 .

Rick_SAS
SAS Super FREQ

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. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

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.

Discussion stats
  • 5 replies
  • 927 views
  • 2 likes
  • 4 in conversation