StatCharrms (version 0.90.96)

williamsTest: Performs Williams Test

Description

The Williams test is a parametric test for trend. It is used to test for a trend when normality assumption is met.

Usage

williamsTest(df,resp,trt,direction='decreasing',SeIn=NULL)

Arguments

df

A data set.

resp

The name (as a string) of the response variable.

trt

The name (as a string) of the treatment variable.

direction

The direction of the test statistic which can either be 'increasing', 'decreasing').

SeIn

This is used to specify a different standard error then the one calculated within the WilliamsTest function.

Value

trt

The treatment level the test statistic corresponds to.

Y.Tilde

The amalgamated averages for the treatment level.

Se Diff

The standard error.

DF

The degrees of freedom.

Will

The value of the Williams test statistic.

TCrit

The critical value of the Williams test statistic, corresponding to a p-value of 0.05.

References

Williams D.A. (1971). A test for differences between treatment means when several dose levels are compared with a zero dose control. Biometrics 27(1):103-117. Green J., Springer T., Holbeck H. Statistical Analysis of Ecotoxicology Data (Wiley in press)

Examples

Run this code
# NOT RUN {
	#Data 
		data(lengthWeightData)
	#Subset the data
		SubData<-lengthWeightData[lengthWeightData$Age=='16 week', ] 
		SubData<-SubData[SubData$Generation=='F1', ]
		SubData<-SubData[SubData$SEX=='M', ]
		williamsTest(df=SubData, trt='Treatment', 
			resp='WEIGHT', direction='decreasing',SeIn=NULL)
		
# }

Run the code above in your browser using DataLab