monotonicityTest: A test for a monotonic trend

Description Usage Arguments Details Value Author(s) References Examples

View source: R/monotonicityTest.R

Description

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

Usage

1
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.

Details

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

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.

Author(s)

Joe Swintek

References

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

Examples

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

StatCharrms documentation built on Nov. 14, 2020, 5:09 p.m.