phe.sd: Standardize Phenotypic Values

View source: R/phe.sd.R

phe.sdR Documentation

Standardize Phenotypic Values

Description

Standardize the phenotypic values of all the target traits from a training population. Then, output the standardized phenotypic values, the mean vector, and the standard deviation vector of the target traits.

Usage

phe.sd(phe)

Arguments

phe

matrix. An n*t matrix with n individuals and t traits, denotes the phenotypic values. The missing value must be coded as NA.

Value

standardize.phe

An n*t matrix contains the standardized phenotypic values.

mu

A vector with length t contains the averages of the phenotypic values of the t target traits.

sd

A vector with length t contains the standard deviations of the phenotypic values of the t target traits.

Examples

# generate simulated data
phe.test <- data.frame(trait1 = rnorm(50,30,10), trait2 = rnorm(50,10,5), trait3 = rnorm(50,20,20))

# run and output
result <- phe.sd(phe.test)
result

IPLGP documentation built on April 6, 2023, 5:23 p.m.

Related to phe.sd in IPLGP...