Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to fit nonlinear models with heterogeneous variance?

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-20-2019 10:51 AM
(926 views)

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.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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 .

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

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.