quote the variable name or index the results from anova as a dataframe
using [. Someone (Prof. Ripley IIRC, apologies if I got this wrong) once
told me that backticks ` are the preferred, portable way of doing this,
but in this case " quotes work as well.
> example(anova.lm) ## produces fit
> tmp
yep That worked Jorge. Thanks!
summary(pb)$"Pr(>F)1"
NULL
> summ<-summary(pb)
> class(unlist(summ))
[1] "numeric"
> unlist(summ)["Pr(>F)1"]
Pr(>F)1
0.02533637
> names(summ)
NULL
Jorge Ivan Velez wrote:
>
> Hi Paul,
>
> Perhaps
>
> # Data set
> set.seed(123)
> x=rnorm(100)
> y=x+2*rnorm(10
What works, amazingly, is
summary(pb)$"Pr(>F)" [note the quotes]
Abhijit
On Wed, 07 May 2008 18:17:09 -0700
"H. Paul Benton" <[EMAIL PROTECTED]> wrote:
> Yea the anova object seems to be odd. It's not S4 so that's why I tried
> originally the attr() funtion but
>
> summary(pb)$Pr(>F)
>
>
Hi Paul,
Perhaps
# Data set
set.seed(123)
x=rnorm(100)
y=x+2*rnorm(100)
# ANOVA
AOV=anova(lm (y ~ x))
p1=AOV$"Pr(>F)"[1]
p1
or
# ANOVA 2
AOV1=aov(y ~ x)
p2=unlist(summary(AOV1))["Pr(>F)1"]
p2
HTH,
Jorge
On Wed, May 7, 2008 at 8:47 PM, Paul Benton <[EMAIL PROTECTED]> wrote:
> hello all,
Yea the anova object seems to be odd. It's not S4 so that's why I tried
originally the attr() funtion but
summary(pb)$Pr(>F)
Error: unexpected '>' in "summary(pb)$Pr(>"
> summary(pb)$Pr
NULL
> summary(pb)@Pr(>F)
Error: unexpected '>' in "summary(pb)@Pr(>"
> summary(pb)@Pr(F)
Error: no slo
hello all,
Quick question, how do I get the p value out of the anova?
Thanks,
Paul
> pb<-aov(as.numeric(diff[5,16:33]) ~ grF)
> summary(pb)
Df Sum SqMean Sq F value Pr(>F)
grF 3 2.7860e+10 9.2867e+09 4.2236 0.02534 *
Residuals 14 3.0783e+10 2.1988e+09
---
Signif
6 matches
Mail list logo