ebmr.update.grr.svd: Update by fitting GRR model

View source: R/ebmr.update.grr.R

ebmr.update.grr.svdR Documentation

Update by fitting GRR model

Description

Updates parameters of an EBMR fit by fitting the full GRR model, including estimating hyperparameters (residual variance and prior scaling factor). The method uses an SVD on Xtilde = XW^0.5, after which other computations (EM algorithm to maximize hyperparameters, and posterior computations) are cheap.

Usage

ebmr.update.grr.svd(
  fit,
  tol = 1e-08,
  maxiter = 1000,
  compute_Sigma_diag = TRUE,
  compute_Sigma_full = FALSE,
  update_residual_variance = TRUE
)

Arguments

fit

a previous ebmr fit

tol

a tolerance for the EM algorithm

maxiter

maximum number of iterations for EM algorithm

compute_Sigma_diag

boolean flag; set to TRUE to compute the diagonal of the posterior variance, otherwise this variance is set to 0.

compute_Sigma_full

boolean flag; set to TRUE to compute full Sigma matrix for testing purposes

update_residual_variance

boolean flag; set to FALSE to keep residual variance fixed

Details

The code is based on the ideas at https://stephens999.github.io/misc/ridge_em_svd.html but extended to deal with case where n>p as well as n<=p.

Value

an updated ebmr fit


stephenslab/ebmr.alpha documentation built on March 30, 2022, 3:49 a.m.