Skip to content

Commit

Permalink
posthoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jinseob2kim committed Nov 4, 2024
1 parent c7f7ecf commit 599cd83
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions code/descriptive_posthoc.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
library(data.table);library(magrittr);library(ggpubr)
set.seed(222)


data.aov <- data.frame(group = sample(c("A", "B", "C"), 30, replace = T), tChol = round(rnorm(30, mean = 150, sd = 30)))
rownames(data.aov) <- paste("person", 1:30)
data.aov

res.aov1 <- oneway.test(tChol ~ group, data = data.aov, var.equal = F);res.aov1
res.aov2 <- oneway.test(tChol ~ group, data = data.aov, var.equal = T);res.aov2


## TukeyHSD
res.aov2 <- aov(tChol ~ group, data = data.aov)
TukeyHSD(res.aov2)

library(DescTools)

## "hsd", "bonferroni", "lsd", "scheffe", "newmankeuls", "duncan"
PostHocTest(res.aov2, method = "scheffe")

0 comments on commit 599cd83

Please sign in to comment.