Multiple comparisons in ANOVA models are specified by objects returned from the function mcp(). lincft(): a specification of the linear hypotheses to be tested.model: a fitted model, for example an object returned by aov().The simplified format is as follow: glht(model, lincft) glht stands for general linear hypothesis tests. It’s possible to use the function glht() to perform multiple comparison procedures for an ANOVA. Multiple comparisons using multcomp package If the levels are not automatically in the correct order, re-order them as follow: my_data$group % Levels(my_data$group) "ctrl" "trt1" "trt2" In R terminology, the column “group” is called factor and the different categories (“ctr”, “trt1”, “trt2”) are named factor levels. The sample_n() function randomly picks a few of the observations in the data frame to print out: # Show a random sampleĭplyr::sample_n(my_data, 10) weight group To have an idea of what the data look like, we use the the function sample_n().
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |