StatCharrms (version 0.90.92)

rankTransform: Rank transforms a response

Description

Transforms a response by rank into critical values of the standard normal distribution. In the case of ties this function will use the mean of the transformed response.

Usage

rankTransform(Data, VecName)

Arguments

Data

A data set.

VecName

The name (as a string) of the response to be transformed.

Value

Data

The original data set with a new variable called 'TransformedResponse' which is the rank transform of the response.

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', ]
	#Run 
		RankData<-rankTransform(Data=SubData, VecName='WEIGHT')
		head(RankData)
# }

Run the code above in your browser using DataLab