[R] Access Object's Objects HELP

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Thu May 22 00:50:41 CEST 2003



DivineSAAM at aol.com wrote:
> Dear WizaRds,
> 
> A run of nls produces the following concise summary:
> 
> 
>>summary(cs.wt)
> 
> 
> Formula: 0 ~ wt.MM(conc, time, A1, a1, A2, a2)
> 
> Parameters:
>     Estimate Std. Error t value Pr(>|t|)  
> A1 4.814e+02  2.240e+01  21.495   0.0296 *
> a1 7.401e-01  7.435e-02   9.956   0.0637 .
> A2 1.613e+02  1.738e+01   9.280   0.0683 .
> a2 1.770e-02  7.324e-03   2.417   0.2497  
> 
> ------------------------------------------
> I need to access the estimates of A1,a1,A2...
> 
> How can I do this?
> 
> Also, I need to add a column to Parameters: giving
> the ratio of the Std. Error to Estimate. Is there a way to get summary to do this?
> I can't find the summary implementation.
> 
> I am using R 1.7.0 on Windows XP
> 

Most of the time, you can assign the summary list to a variable and 
extract it that way. As in (using the example on ?nls):

R> x = summary( fm1DNase1 )
R> names(x)
[1] "formula"      "residuals"    "sigma"
[4] "df"           "cov.unscaled" "correlation"
[7] "parameters"
R> x$parameters
      Estimate Std. Error  t value     Pr(>|t|)
Asym 2.345180 0.07815395 30.00719 2.165503e-13
xmid 1.483090 0.08135322 18.23026 1.218535e-10
scal 1.041455 0.03227080 32.27236 8.506916e-14

sundar




More information about the R-help mailing list