rankTransform: Rank transforms a response

Description Usage Arguments Value Author(s) Examples

View source: R/rankTransform.R

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

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

Author(s)

Joe Swintek

Examples

1
2
3
4
5
6
7
8
9
	#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)

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