StatCharrms (version 0.90.96)

jonckheereTerpstraTest: Perform the Jonckheere-Terpstra trend test

Description

The Jonckheere-Terpstra is a non-parametric test for trend. This function is a wrapper for jonckheere.test from the clinfun package.

Usage

jonckheereTerpstraTest(Data, Treatment, Response, TestDirection, AlphaLevel)

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.

TestDirection

The direction of the test statistic can be any of: c('Both', 'Descending', 'Ascending').

AlphaLevel

The alpha level each step needs to pass before moving on to test a lower treatment level.

Value

JT Statistic

The JT test statistic.

Decreasing Trend P-Value

The p-value for a decreasing trend.

D.Sig

The significance flag for the decreasing tend 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.

Increasing Trend P-Value

The p-value for a increasing trend.

I.Sig

The significance flag for the increasing tend 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.

Max Level of Treatment

The treatment level the test statistic corresponds to.

References

Jonckheere, A. R. (1954). A distribution-free k-sample test against ordered alternatives. Biometrika 41:133-145. Terpstra, T. J. (1952). The asymptotic normality and consistency of Kendall's test against trend, when ties are present in one ranking. emphIndagationes Mathematicae 14:327-333.

See Also

jonckheere.test

Examples

Run this code
# NOT RUN {
	## Not run: 
	#Data 
		data(lengthWeightData)
	#Subset the data
		SubData<-lengthWeightData[lengthWeightData$Age=='16 week', ] 
		SubData<-SubData[SubData$Generation=='F1', ]
		SubData<-SubData[SubData$SEX=='M', ]
	#Not Run 
	
# }
# NOT RUN {
		jonckheereTerpstraTest(Data=SubData, Treatment='Treatment', 
			Response='WEIGHT', TestDirection='Both', AlphaLevel=0.05)
	
# }
# NOT RUN {
	## End(Not run)		
# }

Run the code above in your browser using DataCamp Workspace