calcvar {hscovar} | R Documentation |
Variance of estimator
Description
Calculation of variance of estimator and residual degrees of freedom
Usage
calcvar(lambda, eigendec, n, weights = 1)
Arguments
lambda |
shrinkage parameter |
eigendec |
eigenvalue decomposition of (p x p) correlation matrix
|
n |
sample size |
weights |
vector (LEN p) of SNP-specific weights or scalar if weights are equal for all SNPs; default value 1 |
Details
The variance of estimator beta (regression coefficient of SNP-BLUP
approach) and the residual degrees of freedom are calculated based on the
eigenvalue decomposition of correlation matrix R
Value
df
residual degrees of freedom
var.beta
vector (LEN p) of variance of estimator beta up to a constant (i.e. residual variance / n)
Examples
### correlation matrix (should depend on sire haplotypes)
R <- AR1(100, rho = 0.1)
eigendec <- eigen(R)
out <- calcvar(1200, eigendec, 100)
[Package hscovar version 0.4.2 Index]