biometryhub / biometryassist

A package to aid in teaching experimental design and analysis through easy access and documentation of helper functions. Renaming of previous BiometryTraining package.
https://biometryhub.github.io/biometryassist
Other
6 stars 1 forks source link

Multiple comparism #70

Closed BB1464 closed 9 months ago

BB1464 commented 9 months ago

@rogerssam thank you very much for writing this very good package; I was just curious because I know we can do post hoc test for interaction with two or more groups I am just curious if I can achieve this with the multiple_comparism function?

here is an example of what I mean in Agricola

HSD.test(modelObject, try=c(trt1,trt2),console=T)

Please how can I do this with your package ?

Thanks

rogerssam commented 9 months ago

Hi @BB1464,

Yes the multiple comparisons function is designed to handle post-hoc Tukey's HSD tests for interactions, at least up to three way (i.e. trt1:trt2:trt3).

You can see examples here of how to use the function: https://biometryhub.github.io/biometryassist/reference/multiple_comparisons.html#ref-examples

If you have a model (say modelObject as per your example above), with terms trt1:trt2, it's as simple as:

multiple_comparisons(modelObject, "trt1:trt2")

Other options can be specified if necessary, but that should give you a good start.

BB1464 commented 9 months ago

Thanks @rogerssam I see, it is now working. I was using the initial way from agricolae. I just discovered your package and I must confess this is great. Thanks again!!!