[R] Nonlinear regression help

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Apr 24 12:07:50 CEST 2009



Taylor Hermes wrote:
> I seek help with nonlinear regression for my data.  I've run intro
> trouble fitting a model to my data as follows:
> 
> rate_parameter stable_population
> 75 1996.1277
> 100 1623.2979
> 125 1362.3475
> 150 1164.6738
> 175 1014.8227
> 200  892.0851
> 225  794.1844
> 250  710.1489
> 275  639.6738
> 300  578.0496
> 325  525.4965
> 350  479.4752
> 375  440.3050
> 400  402.4397
> 
> The "rate_parameter" here will be my independent variable which
> affects the "stable_population" quantity in an agent-based simulation.
> 
> I can see that the plot of this data seems to fit an exponential
> decay.  I would greatly appreciate if someone could help me out with
> this task.  I've found the following info on this page helpful:
> https://stat.ethz.ch/pipermail/r-help/2001-December/017330.html
> yet, still unable to grasp what I need to do.


Is this homework?

Anyway, I'd go with a simple linear model given your data.frame is 
called "dat":

lm(log(stable_population) ~ sqrt(rate_parameter), data = dat)

Not sure why you want to apply something nonlinear.

Uwe Ligges



> Thanks!
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list