Learn R Programming

nparcomp (version 3.0)

nparcomp: Nonparametric relative contrast effects

Description

The function nparcomp computes the estimator of nonparametric relative contrast effects, simultaneous confidence intervals for the effects and simultaneous 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 (Probit and Logit transformation function). The function 'nparcomp' also computes one-sided and two-sided confidence intervals and p-values. The confidence intervals can be plotted.

Usage

nparcomp(formula, data, type = c("Tukey", "Dunnett",
         "Sequen", "Williams", "Changepoint", "AVE", "McDermott",
         "Marcus", "UmbrellaWilliams", "UserDefined"), control = NULL, 
         conf.level = 0.95, alternative = c("two.sided", "less", 
         "greater"), rounds = 3, correlation = FALSE, 
         asy.method = c("logit", "probit", "normal", "mult.t"), 
         plot.simci = FALSE, info = TRUE, contrast.matrix=NULL, 
         weight.matrix=FALSE)

Arguments

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".

control

Character string defining the control group in Dunnett comparisons. By default it is the first group by definition of the dataset.

conf.level

The confidence level for the conflevel confidence intervals (default is 0.95).

alternative

Character string defining the alternative hypothesis, one of "two.sided", "less" or "greater".

rounds

Number of rounds for the numeric values of the output. By default it is rounds=3.

correlation

A logical whether the estimated correlation matrix and covariance matrix should be printed.

asy.method

Character string defining the asymptotic approximation method, one of "logit", for using the logit transformation function, "probit", for using the probit transformation function, "normal", for using the multivariate normal distribution or "mult.t" for using a multivariate t-distribution with a Satterthwaite Approximation.

plot.simci

A logical indicating whether you want a plot of the confidence intervals.

info

A logical whether you want a brief overview with informations about the output.

contrast.matrix

User defined contrast matrix.

weight.matrix

A logical indicating whether the weight matrix should be printed.

Value

Data.Info

List of samples and sample sizes.

Contrast

Contrast matrix.

Analysis

Comparison: relative contrast effect , relative.effect: estimated relative contrast effect, Estimator: Estimated relative contrast 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.

References

Konietschke, F., Brunner, E., Hothorn, L.A. (2008). Nonparametric Relative Contrast Effects: Asymptotic Theory and Small Sample Approximations.

Munzel. U., Hothorn, L.A. (2001). A unified Approach to Simultaneous Rank Tests Procedures in the Unbalanced One-way Layout. Biometric Journal, 43, 553-569.

See Also

For two-sample comparisons based on relative effects, see npar.t.test.

Examples

Run this code
# NOT RUN {
data(liver)

  # Williams Contrast

a<-nparcomp(weight ~dosage, data=liver, asy.method = "probit",
            type = "Williams", alternative = "two.sided", 
            plot.simci = TRUE, info = FALSE,correlation=TRUE)
summary(a)



 # Dunnett dose 3 is baseline

c<-nparcomp(weight ~dosage, data=liver, asy.method = "probit",
            type = "Dunnett", control = "3",
            alternative = "two.sided", info = FALSE)
summary(c)
plot(c)


data(colu)

  # Tukey comparison- one sided(lower)

a<-nparcomp(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<-nparcomp(corpora~ dose, data=colu, asy.method = "mult.t",
            type = "Tukey",alternative = "greater", 
            plot.simci = TRUE, info = FALSE)
summary(b)


# }

Run the code above in your browser using DataLab