On Tue, Jul 1, 2014 at 1:27 PM, Erin Hodgess <erinm.hodg...@gmail.com> wrote: > Hello R People: > > I'm having a forest/trees location problem with the output of nls. > > If I save the output to an object, and print the object, it shows, amongst > other things, the residual sum of squares. I would like to get that. > > However, when I look at names or str of the object, I can't find the > residual sum of squares.
I think you want to look at summary(object), which contains (see help("summary.nls")) sigma: the square root of the estimated variance of the random error sigma^2 = 1/(n-p) Sum(R[i]^2), where R[i] is the i-th weighted residual. In other words, you probably want summary(object)$sigma^2*(n-p), perhaps a square root of it, or maybe just the sigma. HTH, Peter ______________________________________________ R-help@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.