Solved – How to calculate critical values for Dunnett procedure given alpha, df1 and df2

anovamultiple-comparisonsquantilesr

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 to qf() and qtukey() above.

For one-tailed distribution:

>require(nCDunnett)
>df1 = 5
>df2 = 7
>p = 0.01
>q = qNCDun(p=1-p, nu=df2, rho=(rep(0.5,times=df1)), delta=rep(0,times=df1), two.sided=F)

>q 3.958376

Giving 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 than qf() and qtukey().

Related Question