Description Usage Arguments Value Author(s) References Examples
View source: R/oneWayDunnettTest.R
Performs the Dunnett's test for multiple comparisons. This is a wrapper function for glht
from the multcomp package.
1 2 3 | oneWayDunnettTest(Data, Treatment, Response,
WeightList = NULL, TestDirection = "Decreasing"
,alpha = 0.05)
|
Data |
A data set. |
Treatment |
The name (as a string) of the treatment variable. |
Response |
The name (as a string) of the response variable. |
WeightList |
A list of weights for a weighted ANOVA. |
TestDirection |
The direction the test statistic can be: c('Both', 'Decreasing', 'Increasing'). |
alpha |
The alpha level used to calculate confidence intervals. |
Return a data frame containing:
Treatment |
The name of the treatment variable. |
Levels |
The levels of the treatment variable that are being compared. |
Estimate |
The estimated difference between the levels. |
Std. Error |
The standard error. |
Df |
The degrees of freedom. |
Upper CI |
The upper 1-alpha adjusted confidence interval of the estimated difference between the levels. See |
Lower CI |
The lower 1-alpha adjusted confidence interval of the estimated difference between the levels. See |
t.value |
The value of the test statistic. |
p.value |
The p-value of the test statistic. |
Signif |
The significance flag where "." is a p-value > 0.05, "*" is a 0.01 < p-value <= 0.05, "**" for 0.001 < p-value <= 0.01, and "***" for p-value <= 0.001. |
Joe Swintek
Dunnett C. W. (1955) A multiple comparison procedure for comparing several treatments with a control, Journal of the American Statistical Association, 50:1096-1121.
1 2 3 4 5 6 7 8 9 | #Data
data(lengthWeightData)
#Subset the data
SubData<-lengthWeightData[lengthWeightData$Age=='8 week', ]
SubData<-SubData[SubData$Generation=='F1', ]
SubData<-SubData[SubData$SEX=='M', ]
#Run
oneWayDunnettTest(Data=SubData, Treatment='Treatment', Response='WEIGHT',
WeightList = NULL, TestDirection = "Decreasing")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.