Re: [R] How can I extract information from list which class is nls

From: Joshua Wiley <jwiley.psych_at_gmail.com>
Date: Tue, 26 Apr 2011 15:11:30 -0700

Hi,

One way would be:

summary(nls.object)[["coefficients"]][, "Std. Error"]

If you have a hankering to do it yourself rather than go through the summary formula, the code here will get you there: getAnywhere("summary.nls")

If you are going to be doing it a lot, creating a little function might be nice:

se.coef.nls <- function(model) {
  summary(model)[["coeffficients"]][, "Std. Error"] }

se.coef.nls(yourmodel)

I have been doing something along those lines for a number of models. Sadly, there is not a consistent name always given to the parameter or coefficients table, so it will not quite be one size fits all, but generally using str(), you can figure out what the names of what you want are so it is not much trouble to get out.

str(summary(yourmodel))

Cheers,

Josh

On Tue, Apr 26, 2011 at 11:21 AM, Schatzi <adele_thompson_at_cargill.com> wrote:
> How do I extract the standard error of the parameter estimates?
>
> Also, if I would like to add two parameters together (x+y), can I use this
> equation to calculate the new standard error?:
> x = parameter 1
> y = parameter 2
> xSE = SE parameter 1
> ySE = SE parameter 2
>
> NewSE=(x+y)*sqrt((xSE/x)^2+(ySE/y)^2)
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-can-I-extract-information-from-list-which-class-is-nls-tp804151p3476154.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/

______________________________________________
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.
Received on Tue 26 Apr 2011 - 22:16:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Apr 2011 - 23:00:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive