I'm a novice with R. I want to do a nonlinear regression fitting on the following 1st order decaying time-series formula:
y = a*exp^(-kt)
Can anyone show me the scripts and process to do this nonlinear fitting? Thanks!
I'm a novice with R. I want to do a nonlinear regression fitting on the following 1st order decaying time-series formula:
y = a*exp^(-kt)
Can anyone show me the scripts and process to do this nonlinear fitting? Thanks!
Copyright © 2021 Jogjafile Inc.
The nls() function performs non-linear least squares, which I think is what you're asking about. Here's an example:
Another option might be to do straight linear regression on the log-transformed data -- I'm not sure if that violates your modeling assumptions.
Source for this: https://stat.ethz.ch/pipermail/r-help/2007-July/137063.html