My HSD.test does not work. Any tips on how to run?

Asked

Viewed 194 times

2

My treatment is in tracks and I am using as a basis the script taken from the book "Agricultural Experimentation" Kronha & Banzatto pg 161, accessed by website.

I intend to perform the Anova and then the test to define the interactions:

ex08.anovaRA<-anova(ex08.av$'bloco:camada')
ex08.anovaRA

Testing layer factor

require(agricolae)
HSD.test(pH,camada,ex08.anovaRA$Df[2],ex08.anovaRA$Mean[2],alpha=0.05)

After putting this on RStudio, it runs, no errors appear, but no comparison table appears. What may be missing from my script?

  • 1

    Please enter your database in the question with the command: dput(dados). The link informed does not work.

  • 1

    The question is clear and objective. I do not understand why it was closed.

1 answer

4

If you want the output to appear on the console you need to put the argument console = TRUE.

For example:

> library(agricolae)
> data(sweetpotato)
> model<-aov(yield~virus, data=sweetpotato)
> HSD.test(model,"virus", group=TRUE)
> HSD.test(model,"virus", group=TRUE, console = TRUE)

Study: model ~ "virus"

HSD Test for yield 

Mean Square Error:  22.48917 

virus,  means

      yield      std r  Min  Max
cc 24.40000 3.609709 3 21.7 28.5
fc 12.86667 2.159475 3 10.6 14.9
ff 36.33333 7.333030 3 28.0 41.8
oo 36.90000 4.300000 3 32.1 40.4

Alpha: 0.05 ; DF Error: 8 
Critical Value of Studentized Range: 4.52881 

Minimun Significant Difference: 12.39967 

Treatments with the same letter are not significantly different.

      yield groups
oo 36.90000      a
ff 36.33333     ab
cc 24.40000     bc
fc 12.86667      c

However, I think the ideal is to save the result in an object and go giving print in the necessary parts, for example:

out <- HSD.test(model,"virus", group=TRUE)
out$means
out$statistics
out$parameters

Browser other questions tagged

You are not signed in. Login or sign up in order to post.