[R] somebody's stolen my probabilities

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Sep 4 08:00:42 CEST 2000


On Mon, 4 Sep 2000, Strumila, John wrote:

> gday gurus,
> 
> could someone please help me with this one?  Can't find it in the doco.
> 
> summary of my lm object gives "Pr(>|t|)" but coef doesn't.  How do I get
> hold of these probabilities within an object?  There doesn't seem to be an
> appropriate attribute within the object - I was hoping for something like
> "my.lm$probabilies".

They are not in the object, but in the result of summary applied to the
object. So:

> example(lm)
> slm.D9 <- summary(lm.D9)
> names(slm.D9)
 [1] "call"          "terms"         "residuals"     "coefficients" 
 [5] "sigma"         "df"            "r.squared"     "adj.r.squared"
 [9] "fstatistic"    "cov.unscaled" 
> slm.D9$coefficients 
            Estimate Std. Error   t value     Pr(>|t|)
(Intercept)    5.032  0.2202177 22.850117 9.547918e-15
groupTrt      -0.371  0.3114349 -1.191260 2.490232e-01
> slm.D9$coefficients[,4]
 (Intercept)     groupTrt 
9.547918e-15 2.490232e-01 

In general, summary.foo computes summaries, and print.summary.foo prints
it. Sometimes there is more in the summary object than printed (e.g.
intermediate results like the unscaled covariance matrix in summary.lm).

In this case ?summary.lm will help, but R is not very complete at
documenting summary methods.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list