normalScores: normalScores

Description Usage Arguments Details Examples

View source: R/normalScores.R

Description

Convert the raw indicators into normalised indicators using the inverse cumulative normal (probit) function. The resulting variables should appear normally distributed. In SIMD this function is used to transform indicators before combining them. The function will take a numeric vector as input and return a numeric vector of equal length with the transformation applied.

Usage

1
normalScores(v, ties = "average", forwards = TRUE)

Arguments

v

a numeric vector as the input variable

ties

how to deal with ties, passed to ties.method argument in rank

forwards

lowest numerical value on left of the distribution? i.e. the lowest number in input data is also the lowest number in the output data default is TRUE

Details

This function calculates the normal scores for each indicator. The normal score is defined as follows:

yi = inverse_probit ( ri / (n + 1) )

where: inverse_probit is the inverse cumulative normal (probit) function, ri is the rank of the i'th observation and n is the number of non-missing observations for the ranking variable.

This is the inverse cumulative normal probability density of proportional ranks. The resulting variable should appear normally distributed regardless of the input data. We translated this approach using the SAS documentation as a guide.

Examples

1
2
# (not run)
# PUT SOME CODE HERE

TheDataLabScotland/simdr documentation built on May 29, 2019, 1:05 p.m.