bigRR_update: Updating a bigRR fit to be a heteroscedastic effects model...

Description Usage Arguments Details Author(s) References Examples

Description

This function updates the obtained bigRR object into a new object with heteroscedasticity assumption.

Usage

1
2
bigRR_update(obj, Z, update.col = c(1:ncol(Z)), RandC = ncol(Z),family = gaussian(link = identity), 
             tol.err = 1e-6, tol.conv = 1e-8, GPU = FALSE)

Arguments

obj

A bigRR object.

Z

The design matrix for the shrinkage/random effects.

update.col

The indeces for the random effects to be updated.

RandC

The columns corresponding to different variance components.

family

the distribution family of y, see help('family') for more details.

tol.err

internal tolerance level for extremely small values; default value is 1e-6.

tol.conv

tolerance level in convergence; default value is 1e-8.

GPU

logical; specify whether GPU should be used in computation. Note that: 1. this option is only available in the R-Forge versions of bigRR; 2. the package gputools is required in this case, and the computer's graphic card needs to be CUDA-enabled. Check e.g. NVIDIA website for more information.

Details

See the reference paper for details.

Author(s)

Xia Shen, Lars Ronnegard

References

Shen X, Alam M, Fikse F and Ronnegard L (2013). A novel generalized ridge regression method for quantitative genetics. Genetics, 193, 1255-1268.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# --------------------------------------------- #  
#              Arabidopsis example              #
# --------------------------------------------- #  
## Not run: 
require(bigRR)
data(Arabidopsis)
X <- matrix(1, length(y), 1)

# fitting SNP-BLUP, i.e. a ridge regression on all the markers across the genome
#
SNP.BLUP.result <- bigRR(y = y, X = X, Z = scale(Z), 
                         family = binomial(link = 'logit'))

# fitting HEM, i.e. a generalized ridge regression with marker-specific shrinkage
#
HEM.result <- bigRR_update(SNP.BLUP.result, scale(Z), 
                           family = binomial(link = 'logit'))

# plot and compare the estimated effects from both methods
#
split.screen(c(1, 2))
split.screen(c(2, 1), screen = 1)
screen(3); plot(abs(SNP.BLUP.result$u), cex = .6, col = 'slateblue')
screen(4); plot(abs(HEM.result$u), cex = .6, col = 'olivedrab')
screen(2); plot(abs(SNP.BLUP.result$u), abs(HEM.result$u), cex = .6, pch = 19, 
                col = 'darkmagenta')

# create a random new genotypes for 10 individuals with the same number of markers 
# and predict the outcome using the fitted HEM
#
Z.new <- matrix(sample(c(-1, 1), 10*ncol(Z), TRUE), 10)
y.predict <- as.numeric(HEM.result$beta + Z.new %*% HEM.result$u)
#
# NOTE: The above prediction may not be good due to the scaling in the HEM 
#       fitting above, and alternatively, one can either remove the scaling 
#       above or scale Z.new by row-binding it with the original Z matrix.

## End(Not run)

EPISbigRR documentation built on May 2, 2019, 4:49 p.m.