StatCharrms (version 0.90.92)

monotonicityTest: A test for a monotonic trend

Description

Performs the test for monotonicity as per the the OECD guidance on statistics.

Usage

monotonicityTest(Data, Treatment, Response)

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.

Value

A table of test statistics for both the linear and quadratic trends. If the quadratic trend is significant and the linear trend is not, then the response is not monotonic, otherwise it is consider to be monotonic.

Details

calls both getLineContrast and getQuadContrast to attain the contrasts used in the monotonicity test.

References

Current Approaches in the Statistical Analysis of Ecotoxicity Data A guidance to application DOI: 10.1787/9789264085275-en

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 
		monotonicityTest(Data=SubData, Treatment='Treatment', 
			Response='WEIGHT')

# }

Run the code above in your browser using DataLab