| mctp {nparcomp} | R Documentation |
The function mctp computes the estimator of nonparametric relative effects based on global rankings, simultaneous confidence intervals for the effects and adjusted p-values based on special contrasts like "Tukey", "Dunnett", "Sequen", "Williams", "Changepoint", "AVE", "McDermott", "Marcus", "UmbrellaWilliams", "UserDefined". The statistics are computed using multivariate normal distribution, multivariate Satterthwaite t-Approximation and multivariate transformations (Fisher function). The function 'mctp' also computes one-sided and two-sided confidence intervals and p-values. The confidence intervals can be plotted.
mctp(formula, data, type = c("Tukey", "Dunnett", "Sequen",
"Williams", "Changepoint", "AVE", "McDermott", "Marcus",
"UmbrellaWilliams", "UserDefined"), conf.level = 0.95,
alternative = c("two.sided", "less", "greater"),
asy.method = c("fisher", "mult.t", "normal"),
plot.simci = FALSE, control = NULL, info = TRUE, rounds = 3,
contrast.matrix = NULL, correlation = FALSE,
effect=c("unweighted","weighted"))
formula |
A two-sided 'formula' specifying a numeric response variable and a factor with more than two levels. If the factor contains less than 3 levels, an error message will be returned. |
data |
A dataframe containing the variables specified in formula. |
type |
Character string defining the type of contrast. It should be one of "Tukey", "Dunnett", "Sequen", "Williams", "Changepoint", "AVE", "McDermott", "Marcus", "UmbrellaWilliams", "UserDefined". |
conf.level |
The confidence level for |
alternative |
Character string defining the alternative hypothesis, one of "two.sided", "less" or "greater". |
asy.method |
Character string defining the asymptotic approximation method, one of "mult.t" for using a multivariate t-distribution with a Satterthwaite Approximation, "fisher" for using the Fisher transformation function, "normal", for using the multivariate normal distribution. |
plot.simci |
A logical indicating whether you want a plot of the confidence intervals. |
control |
Character string defining the control group in Dunnett comparisons. By default it is the first group by definition of the factor variable. |
info |
A logical whether you want a brief overview with informations about the output. |
rounds |
Number of rounds for the numeric values of the output (default is 3). |
contrast.matrix |
User defined contrast matrix. |
correlation |
A logical whether the estimated correlation matrix and covariance matrix should be printed. |
effect |
Character string defining the type of effect, one of "unweighted" and "weighted". |
Data.Info |
List of samples and sample sizes and estimated effect per group. |
Contrast |
Contrast matrix. |
Analysis |
Estimator: Estimated relative effect, Lower: Lower limit of the simultaneous confidence interval, Upper: Upper limit of the simultaneous confidence interval, Statistic: Teststatistic p.Value: Adjusted p-values for the hypothesis by the choosen approximation method. |
input |
List of input by user. |
If the samples are completely seperated the variance estimators are Zero by construction. In these cases the Null-estimators are replaced by 0.001. Estimated relative effects with 0 or 1 are replaced with 0.001, 0.999 respectively.
A summary and a graph can be created separately by using the functions
summary.mctp and plot.mctp.
For the analysis, the R packages 'multcomp' and 'mvtnorm' are required.
Frank Konietschke
F. Konietschke, L.A. Hothorn, E. Brunner: Rank-Based Multiple Test Procedures and Simultaneous Confidence Intervals. Electronic Journal of Statistics, Vol.0 (2011) 1-8.
Konietschke, F., Placzek, M., Schaarschmidt, S., Hothorn, L.A. (2014). nparcomp: An R Software Package for Nonparametric Multiple Comparisons and Simultaneous Confidence Intervals. Journal of Statistical Software, 61(10), 1-17.
For simultaneous confidence intervals for relative contrast effects, see nparcomp.
data(liver)
# Williams Contrast
a<-mctp(weight ~dosage, data=liver, asy.method = "fisher",
type = "Williams", alternative = "two.sided",
plot.simci = TRUE, info = FALSE)
summary(a)
# Dunnett Contrast
b<-mctp(weight ~dosage, data=liver, asy.method = "fisher",
type = "Dunnett", alternative = "two.sided",
plot.simci = TRUE, info = FALSE)
summary(b)
# Dunnett dose 3 is baseline
c<-mctp(weight ~dosage, data=liver, asy.method = "fisher",
type = "Dunnett", control = "3",alternative = "two.sided",
plot.simci = TRUE, info = FALSE)
summary(c)
data(colu)
# Tukey comparison- one sided(less)
a<-mctp(corpora~ dose, data=colu, asy.method = "mult.t",
type = "Tukey",alternative = "less",
plot.simci = TRUE, info = FALSE)
summary(a)
# Tukey comparison- one sided(greater)
b<-mctp(corpora~ dose, data=colu, asy.method = "mult.t",
type = "Tukey",alternative = "greater",
plot.simci = TRUE, info = FALSE)
summary(b)
# Tukey comparison- one sided(less)
c<-mctp(corpora~ dose, data=colu, asy.method = "mult.t",
type = "Tukey",alternative = "less",
plot.simci = TRUE, info = FALSE)
summary(c)
# Marcus comparison- one sided(greater)
d<-mctp(corpora~ dose, data=colu, asy.method = "fisher",
type = "Marcus",alternative = "greater",
plot.simci = TRUE, info = FALSE)
summary(d)