[R] Odp: Anova Test

Petr PIKAL petr.pikal at precheza.cz
Tue May 15 17:03:08 CEST 2007


Hi


r-help-bounces at stat.math.ethz.ch napsal dne 15.05.2007 16:39:20:

> 
> Hi,
> 
> I am very new to R. I am trying to perform an Anova Test and see if it
> differs or not.
> 
> Basically, i have 4 tests and 1 control.
> 
> Tester
> Test1 Test2  Test3  Test4  Control
> 20       25      15        10       17
> 
> The inference is at alpha=0.05. they are all independent. I am trying to
> find if they differ or the same.


Maybe t.test?

 x <- c(20,25,15,10)
t.test(x-17)

        One Sample t-test

data:  x - 17 
t = 0.1549, df = 3, p-value = 0.8867
alternative hypothesis: true mean is not equal to 0 
95 percent confidence interval:
 -9.771301 10.771301 
sample estimates:
mean of x 
      0.5

Regards

Petr

> 
> 
> > test1<-c(20)
> > test2<-c(25)
> > test3<-c(15)
> > test4<-c(17)
> > test4<-c(10)
> > control<-c(17)
> > tester<-data.frame(test1,test2,test3,test4,control)
> > tester
>   test1 test2 test3 test4 control
> 1    20    25    15    10      17
> > anova(lm(tester))
> Analysis of Variance Table
> 
> Response: test1
>           Df Sum Sq Mean Sq F value Pr(>F)
> Residuals  0      0 
> 
> I think i did something wrong. I need to find the correct F statistic 
test.
> 
> any help.
> 
> thanks.
> 
> 
> -- 
> View this message in context: 
http://www.nabble.com/Anova-Test-tf3758829.html#a10624007
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.



More information about the R-help mailing list