[R] residuals from nls fit on time series

Jon Phillips pcxjp3 at nottingham.ac.uk
Wed Dec 2 14:25:15 CET 2009


Hi,

I've been fitting some time-series data to 
x ~ c + m*t + a*exp(-t*k)
 with nls.  The fit works fine, and I can get the residuals out by
summary(fit)$residuals.  

My problem is that the residuals are not a time series, so when I plot
them, I get 0:10000 on the x-axis, instead of eg. 0:0.5, or 0:5 (depends
on the exact fit).

Is there any way of getting the times out of the fit, or am I stuck?

Thanks

Jon Phillips


This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.




More information about the R-help mailing list