Description Usage Arguments Value Author(s) References Examples
This function performs a Dunns (non-parametric dunnett) test for multiple comparisons. The code used in this function is a direct translation of the code in the SAS version of StatCharrms.
1 | dunnsTest(Data, Treatment, Response, TestDirection)
|
Data |
A data set. |
Treatment |
The name (as a string) of the treatment variable. |
Response |
The name (as a string) of the response variable. |
TestDirection |
The direction the test statistic can be: c('Both', 'Descending', 'Ascending'). |
Return a data frame containing:
Treatment |
The level of the treatment variable. |
Count |
The Number of observation in that treatment. |
Rank |
The average rank of the response in the treatment level. |
Difference |
Difference in rank of the current level to the rank of the controls. |
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
Dunn, O. J. 1964. Multiple comparisons using rank sums. Technometrics 6:241-252.
1 2 3 4 5 6 7 8 9 | #Data
data(lengthWeightData)
#Subset the data
SubData<-lengthWeightData[lengthWeightData$Age=='16 week', ]
SubData<-SubData[SubData$Generation=='F1', ]
SubData<-SubData[SubData$SEX=='M', ]
#Run
dunnsTest(Data=SubData, Treatment='Treatment',
Response='WEIGHT', TestDirection='Both')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.