StatCharrms (version 0.90.96)

oneWayDunnettTest: One way Dunnett's test.

Description

Performs the Dunnett's test for multiple comparisons. This is a wrapper function for glht from the multcomp package.

Usage

oneWayDunnettTest(Data, Treatment, Response, 
WeightList = NULL, TestDirection = "Decreasing"
,alpha = 0.05)

Arguments

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.

Value

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 confint.glht for more information.

Lower CI

The lower 1-alpha adjusted confidence interval of the estimated difference between the levels. See confint.glht for more information.

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.

References

Dunnett C. W. (1955) A multiple comparison procedure for comparing several treatments with a control, Journal of the American Statistical Association, 50:1096-1121.

Examples

Run this code
# NOT RUN {
	#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")	
# }

Run the code above in your browser using DataCamp Workspace