I am looking for an R function that can calculate critical values for a Dunnett multiple comparison procedure for any family-wise error rate and degrees of freedoms.
In short, I need similar functions to the two below found in R to calculate quantiles for the fisher and studentized distribution:
f_crit <- qf(p, df1, df2, lower.tail=F)
q_crit <- qtukey(p, df1, df2, lower.tail=F)
Is there any R package that provide similar function for the critical values of Dunnett?
d_crit <- ???(p, df1, df2)
Best Answer
It turns out the
nCDunnett
package contain functions to calculate the quantiles similar toqf()
andqtukey()
above.For one-tailed distribution:
>q
3.958376Giving similar output as the table values found in text-books, such as dunnett-1side.pdf. The
qNCDun()
function, however, operates an order of magnitude slower thanqf()
andqtukey()
.