[R] find a function for a random curve
S Ellison
S.Ellison at lgcgroup.com
Wed Jul 10 15:51:10 CEST 2013
> I want to find a functional form for my data. I have tried
> smoothing and obtained a kinda perfect fit.
> However, I can only draw it but cannot call it.
You'll need to apply the smoothing function to the data separately, store that and plot the curve (?) fom that.
You can plot a line for many model fits using the associated predict() method and if necessary specifying a newdata data frame containing neatly-spaced predictors; look up the generic ?predict and predict.lm for a typical case. predict.nlm and predict.loess also exist and work much the same way.
S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
More information about the R-help
mailing list