Tt.aov | R Documentation |
Performs the analysis of variance using the functions aov and anova. Additionally, creates a table with mean values, standard deviation and size of sample per treatment. If p>0.05, a Tukey test is also performed.
Tt.aov(vx, vtreat1, vtreat2 = NULL, p.lim = 0.05, Tuk.labs = TRUE)
vx |
dependent variable |
p.lim |
p-value for the limit of ANOVA to perform Tukey test |
Tuk.labs |
If TRUE, it will print the differences by TukeyHSD by different letters (requires package 'multcompView') |
vtreat |
independent variable(s). If vtreat2 exists, the function will perform a 2-way anova |
aov.output a list with the following objects
anova : Which contains the details of the analysis
stats : mean, sd, size of sample (n) and, if requested, Tukey HSD differences
p : value(s) of p from anova, for a quick answer
Tukey.interaction : If p>p.lim, TukeyHSD is performed. In the 2-ways anova, Tukey test will be perform for the interaction between treatments, as well as per-treatment, being 'Tukey.treatment1' and 'Tukey.treatment2' the results in the list.
data('compost') Pb <- Tt.aov(compost$Pb, compost$Treatment, p.lim=0.001) # 1-way anova Pb Zn <- Tt.aov(compost$Pb,compost$Treatment,compost$Plant) # 2-way anova Zn$anova # Results from anova Zn$stats # Mean, SD and n values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.