[R] Duncan's MRT: limitations to qtukey() function?
Andrea Onofri
andrea.onofri at alice.it
Tue Jan 22 16:44:56 CET 2008
Dear all,
I'm using R to perform multiple comparison testing on agriculture
genotype trials. To perform the Duncan's MRT, I use the qtukey()
function with the following syntax:
qtukey(p = ((1 - 0.05) ^ (pos - 1)), nmeans = pos, df = ni)
I experience a strange behaviour when the number of means in the trial
and the number of residual degrees of freedom (ni) becomes high
(orientatively pos > 30 and ni > 60), i.e. the function returns NaN
together with the following message:
convergence failed in 'qtukey'
Running the code below should reproduce a statistical table for
Duncan's MRT, such those reported on old books of agricultural
statistics (ex. Steel and Torrie, 1960).
table <- matrix(0, 28, 14)
pos <- c(10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 50, 100, 200)
df <- c(2:20, seq(22, 30, by = 2), 40, 60, 100, 1000)
for (i in 1:28) table [i, ] <- qtukey(p = ((1 - 0.05) ^ (pos - 1)),
nmeans = pos, df = df[i])
colnames(table) <- pos
rownames(table) <- df
Indeed, I get several NaN and some odd figures.
Am I doing something wrong or is there any intrinsic limit for the
values of p, nmeans and df within the qtukey() function? Just in this
latter case, is it possible to raise those limits? Some genotype trials
can have more than thirty treatments under comparison.
I thank you all for your attention.
Andrea Onofri
Department of Agriculture and Environmental Sciences
University of Perugia (ITALY)
More information about the R-help
mailing list