getVariances: getVariances

View source: R/utils.R

getVariancesR Documentation

getVariances

Description

Computes the sample-variance (var()) for sets of markers as well as the total variance.

Usage


	getVariances(X, B, sets, verbose=TRUE)

Arguments

X

(numeric, n x p) incidence matrix for b.

B

(numeric), object returned by the function readBinMat().

sets

(numeric).

verbose

(logical), if TRUE it shows progress information in the console.

Value

A matrix with variances for markers as well as the total.

Author(s)

Gustavo de los Campos.

Examples


## Not run: 
#Demos

library(BGLR)
data(wheat)
y=wheat.Y[,1] ; X=scale(wheat.X)
dir.create('test_saveEffects')
setwd('test_saveEffects')
fm=BGLR(y=y,ETA=list(list(X=X,model='BayesB',saveEffects=TRUE)),nIter=12000,thin=2,burnIn=2000)
B=readBinMat('ETA_1_b.bin')
plot(B[,1],type='o',col=4)
VAR=getVariances(B=B,X=X,sets=sample(1:20,size=1279,replace=T))
head(VAR)
plot(VAR[,"total"])


## End(Not run)


BGLR documentation built on May 12, 2022, 1:06 a.m.

Related to getVariances in BGLR...