Standardize z-scores.

scale.zscore(Z, V.t, D, stdize = TRUE)

Arguments

Z

z-score matrix

V.t

t(V) matrix of the SVD result on genotype matrix

D

D diagonal elements of the SVD result on genotype matrix

stdize

standardize if TRUE, otherwise just center the mean

Value

locally standardized z-score matrix

Details

Estimate \(\mu\) and \(\tau\) parameters in the model: $$\mathbf{z} \sim \mathcal{N}\!\left(R (\mu I), \tau^{2}R \right)$$ then standardize z-scores by $$\mathbf{z} \gets (\mathbf{z} - \mu I) / \tau.$$