PCG: Preconditioned Conjugate Gradient

Description Usage Arguments Value Examples

View source: R/ScoreEB.R

Description

Conduct preconditioned conjugate gradient method to accelerate.

Usage

1
PCG(G,b,m.marker,sigma.k2,sigma.e2,tol,miter)

Arguments

G

genotype data.

b

column vector.

m.marker

the number of markers.

sigma.k2

variance of polygenic.

sigma.e2

variance of residual error.

tol

convergence threshold.

miter

the maximum number of iterations.

Value

x

x is approximate solution of linear equations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(geno)
G <- t(geno[,-c(1:4)])
n.sample <- dim(G)[1]
m.marker <- dim(G)[2]
b <- rnorm(n.sample)
sigma.k2 <- 6.0
sigma.e2 <- 10.0
tol <- 5e-4
miter <- 20
PCG(G,b,m.marker,sigma.k2,sigma.e2,tol,miter)

ScoreEB documentation built on Sept. 16, 2021, 1:06 a.m.

Related to PCG in ScoreEB...