I would like to compute post hoc tests to follow up on results from the nparLD package.
In my sample dataset, I have two conditions, "drugA" and "drugB". There are 6 animals A-F and the weight of each animal has been measured 3 times under the influence of each drug.
id <- rep(c("A","B","C","D","E","F"),6)
drug <- c(rep(c("drugA"), 18), rep(c("drugB"), 18))
time <- rep(rep(1:3, each = 6),2)
value <- c(rnorm(6, 1, 0.4), rnorm(6, 3, 0.5), rnorm(6, 6, 0.8), rnorm(6, 1.1, 0.4), rnorm(6, 0.8, 0.2), rnorm(6, 1, 0.6))
df <- data.frame(id,drug, time, value)
df$id <- as.factor(df$id)
df$drug <- as.factor(df$drug)
df$time <- as.factor(df$time)
library(nparLD)
stats <- nparLD(data = df, formula = value ~ drug*time, subject = "id")
stats$Wald.test
stats$ANOVA.test
What do you recommend for post hoc testing? Individual comparisons, where I compare subsets of the data using nparLD? Or is there a more elegant way of doing this?
Also, the results of the Wald and ANOVA-type tests differ, especially regarding the factor 'time'. What do you recommend?