stdsGs: Transform to standard normal

Description Usage Arguments Value Examples

View source: R/stdsGs.R

Description

This function takes the vector x and transforms it to be approximately standard normal. It is meant to be used with the function transformSSNVars.

Usage

1
stdsGs(x, na.rm = T)

Arguments

x

A numeric vector of observations

na.rm

Whether missing observations should be ignored. Defaults to TRUE.

Value

A numeric vector of size length(x).

Examples

1
2
3
4
5
x <- rnorm(100, 4, 2)
x.std <- stdsGs(x)
par(mfrow = c(1, 2))
plot(density(x), main = "Unstandardised")
plot(density(x.std), main = "Standardised")

apear9/SSNdesign documentation built on Feb. 19, 2020, 4:29 a.m.