Winnie09 / Lamian

39 stars 9 forks source link

Only group 0 and 1 works? #22

Open wJDKnight opened 6 months ago

wJDKnight commented 6 months ago

The result of this set.seed(123) branchPropTest(data = matrix(rnorm(100), nrow = 5), design = data.frame(sample = paste0('BM', seq(1,20)), group = c(rep(1,10), rep(0,5),rep(999,5))), method = 't.test') 0.5413330 0.1423769 0.2086212 0.9335409 0.9628128

is the same as set.seed(123) branchPropTest(data = matrix(rnorm(100), nrow = 5)[,1:15], design = data.frame(sample = paste0('BM', seq(1,20)), group = c(rep(1,10), rep(0,5),rep(999,5)))[1:15,], method = 't.test') 0.5413330 0.1423769 0.2086212 0.9335409 0.9628128

This means that only the "0" and "1" in the group are compared. What can I do if I want to compare three groups?

Alexis-Varin commented 3 months ago

Hello, this is a limit of the test not of the Lamian function, a t test cannot be used on more than 2 groups. Maybe the multinom parameter is what you are looking for, I haven't tested it myself.