posthoc

How can I classify post-hoc test results in R?

被刻印的时光 ゝ 提交于 2020-01-01 10:14:08
问题 I am trying to understand how to work with ANOVAs and post-hoc tests in R. So far, I have used aov() and TukeyHSD() to analyse my data. Example: uni2.anova <- aov(Sum_Uni ~ Micro, data= uni2) uni2.anova Call: aov(formula = Sum_Uni ~ Micro, data = uni2) Terms: Micro Residuals Sum of Squares 0.04917262 0.00602925 Deg. of Freedom 15 48 Residual standard error: 0.01120756 Estimated effects may be unbalanced My problem is, now I have a huge list of pairwise comparisons but cannot do anything with

Post-hoc tests for one-way ANOVA with Welch's correction in R

别说谁变了你拦得住时间么 提交于 2019-12-22 10:18:31
问题 I have run a one-way ANOVA test with welch's correction using oneway.test() in R, as I have data that violate the assumption of equal variance (transformations did not solve the problem). A simple data example: > dput(df) structure(list(Count = c(13, 14, 14, 12, 11, 13, 14, 15, 13, 12, 20, 15, 9, 5, 13, 14, 7, 17, 18, 14, 12, 12, 13, 14, 11, 10, 15, 14, 14, 13), Group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,

post hoc test for a two way mixed model anova

自古美人都是妖i 提交于 2019-12-12 12:50:13
问题 I am doing a repeated measures anova with a mixed model. I would like to run a post hoc test to see the p-values of the interaction TREAT*TIME, but I only managed to use the following ghlt Tukey test which do not give me the interaction I am looking for. library(multcomp) library(nlme) oi<-lme(total ~ TREAT * TIME, data=TURN, random = ~1|NO_UNIT) anova(oi) summary(glht(oi, linfct=mcp(TIME="Tukey", TREAT="Tukey"))) what I would be looking for is something like: summary(glht(oi, linfct=mcp(TIME

R lsmeans adjust multiple comparison

不想你离开。 提交于 2019-12-11 04:19:13
问题 I used lme4 to run a mixed effects logistig regression (by calling glmer) in R and now I am trying to do post-hoc comparisons. As they are pairwise, Tukey should be OK,but I would like to manually adjust for how many tests the correction should be made - now it is made for 12 tests, but I am only intersted in 6 comparisons. My code looks like this so far for (i in seq_along(logmixed_ranks)) { print(lsmeans(logmixed_ranks[[i]], pairwise~rating_ranks*indicator_var, adjust="tukey")) } Somehow I

Planned contrasts using ezANOVA output in R

痞子三分冷 提交于 2019-12-05 13:18:25
问题 I've been looking into using planned contrasts as opposed to post-hoc t-tests. I typically use ezANOVA (Type III ANOVA) but it seems that conducting planned contrasts using ezANOVA is not currently catered for. aov() on the other hand is a Type I ANOVA (I don't want to get into a debate about which type is best for which type of design). It is straight forward to conduct planned contrasts using aov() (for between group designs) but I want to conduct a Type III ANOVA in a repeated measures and

How can I classify post-hoc test results in R?

百般思念 提交于 2019-12-04 06:04:27
I am trying to understand how to work with ANOVAs and post-hoc tests in R. So far, I have used aov() and TukeyHSD() to analyse my data. Example: uni2.anova <- aov(Sum_Uni ~ Micro, data= uni2) uni2.anova Call: aov(formula = Sum_Uni ~ Micro, data = uni2) Terms: Micro Residuals Sum of Squares 0.04917262 0.00602925 Deg. of Freedom 15 48 Residual standard error: 0.01120756 Estimated effects may be unbalanced My problem is, now I have a huge list of pairwise comparisons but cannot do anything with it: TukeyHSD(uni2.anova) Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov

Fast post hoc computation using R

ε祈祈猫儿з 提交于 2019-12-02 08:16:19
问题 I have a large dataset which I would like to perform post hoc computation: dat = as.data.frame(matrix(runif(10000*300), ncol = 10000, nrow = 300)) dat$group = rep(letters[1:3], 100) Here is my code: start <- Sys.time() vars <- names(dat)[-ncol(dat)] aov.out <- lapply(vars, function(x) { lm(substitute(i ~ group, list(i = as.name(x))), data = dat)}) TukeyHSD.out <- lapply(aov.out, function(x) TukeyHSD(aov(x))) Sys.time() - start Time difference of 4.033335 mins It takes about 4 min, are there

Posthoc labels on anova boxplot in R

一个人想着一个人 提交于 2019-11-30 14:23:41
问题 If I have some data and do an ANOVA and post-hoc tests, how do I make a boxplot that adds the post-hoc classification automatically, rather than having to edit the figure outside of R? For example, here are some data to get started: install.packages("reshape", dependencies=T) library(reshape) x <- rnorm(30) y <- rnorm(30)+1 z <- rnorm(30)+0.5 data.1 <- data.frame(x, y, z) data.2 <- melt(data.1) Here's code for running a simple one way ANOVA and all of the unplanned comparision post-hoc tests:

Posthoc labels on anova boxplot in R

假如想象 提交于 2019-11-30 09:58:11
If I have some data and do an ANOVA and post-hoc tests, how do I make a boxplot that adds the post-hoc classification automatically, rather than having to edit the figure outside of R? For example, here are some data to get started: install.packages("reshape", dependencies=T) library(reshape) x <- rnorm(30) y <- rnorm(30)+1 z <- rnorm(30)+0.5 data.1 <- data.frame(x, y, z) data.2 <- melt(data.1) Here's code for running a simple one way ANOVA and all of the unplanned comparision post-hoc tests: linear.model <- lm(value~variable, data=data.2) anova(linear.model) # Analysis of Variance Table #