rCARAlasso_ {CARlasso}R Documentation

Block Gibbs sampler for adaptive CAR-LASSO

Description

This function is for advanced users to build their own sampler use adaptive CARlasso as core. It will execute one round of Gibbs sampler of adaptive CAR-LASSO model. Be aware that the function is a void function implemented in C++, and all updated parameters e.g. Omega will be manipulate directly in memory to save space. Users should manage to do their own work to save the state. Also be aware that R uses shallow copy by default, which means one cannot save the state by simply give it to another object e.g. first Omega_old <- Omega_curr then update Omega_curr, Omega_old will also change. This function will NOT check dimensions of input. Below we assume n samples, k responses and p predictors.

Usage

rCARAlasso_(
  Z_curr,
  design,
  lambda2_beta,
  tau2_curr,
  beta_curr,
  lambda_Omega,
  Omega_curr,
  mu_curr,
  r_beta,
  delta_beta,
  r_Omega,
  delta_Omega,
  lambda_diag,
  k,
  p,
  n
)

Arguments

Z_curr

the current (latent) normal Z_curr, should be n*k. Will not be changed

design

the design matrix, should be n*p. Will not be changed

lambda2_beta

the current shrinkage parameter of regression coefficients, should be a vector with p*k entries. Will be updated

tau2_curr

the current latent scale parameter in the normal mixture representation of Laplace, for regression coefficients, should be a vector with p*k entries. Will be updated.

beta_curr

the current regression coefficients, should be a matrix sized p*k (p row and k columns). Will be updated.

lambda_Omega

the current shrinkage parameter for Omega, should be a vector with k*(k-1)/2 entries. Will be updated.

Omega_curr

the current Omega matrix, should be a matrix of size k*k. Will be updated.

mu_curr

the current mu, intercept, should be a vector of size k. Will be updated.

r_beta

hyperprior's parameter of shrinkage for regression coefficients, should be a scalar of type 'double' and positive. Will not be updated.

delta_beta

hyperprior's parameter of shrinkage for regression coefficients, should be a scalar of type 'double' and positive. Will not be updated.

r_Omega

hyperprior's parameter of shrinkage for precision Omega, should be a scalar of type 'double' and positive. Will not be updated.

delta_Omega

hyperprior's parameter of shrinkage for rprecision Omega, should be a scalar of type 'double' and positive. Will not be updated.

lambda_diag

shrinkage parameter of the diagonal of Omega, should be a vector of size k, should be non-negative. Will not be updated

k

integer, number of responses

p

integer, number of predictors

n

integer, number of Z_curr points

Value

Again this is a void function and will not return anything. All update happened in memory directly.


[Package CARlasso version 0.1.2 Index]