SingleSite_regression_sampler_parallel.Rd
The model is either:
y_i = X1_base*alpha1 + X1_list_[i]*alpha2 + X2*beta + e, e ~ N(0,1/Y_prec[i]*V)
y_i = X1_base*alpha1 + X1_list_[i]*alpha2 + X2*V_*beta + e, e ~ N(0,1/Y_prec[i]*V)
Where V = RtR
, priors on elements of alpha1, alpha2 and beta are independent.
Each column of Y is considered independent
SingleSite_regression_sampler_parallel(
Y,
X1_base,
X1_list_,
X2_,
Vx_,
h2s_index,
chol_V_list_,
Y_prec,
Y_prec_a0,
Y_prec_b0,
prior_prec_alpha1,
prior_prec_alpha2,
prior_mean_beta,
prior_prec_beta,
current_alpha1s_,
current_alpha2s_,
BayesAlphabet_parms
)
n x p matrix of observations
n x a1 matrix of X1 covariates common to all p. Can be NULL
p-list of n x a2 matrices of X1 covariates unique to each p. Can be NULL
p-vector of indices for to select appropriate V of each trait
list of cholesky decompositions of V: RtR (each nxn). Can be either dense or sparse
p-vector of Y current precisions
scalars giving the shape and rate of the Gamma distribution for the prior on Y_prec
a1 x p matrix of prior precisions for alpha1
p-vector of precision of alpha2s for each trait
b x p matrix of prior means of beta
b x p matrix of prior precisions of beta
int:
1: block sampler: b < n
2: block sampler: n >= b and X doesn't factorize
3: block sampler: n >= b, but X factorizes into UxVx where Ux is n x m and Vx = m x b, and m << n <= b
either X2, a n x b matrix, or Ux, a n x m matrix. If Ux, then V must be non-NULL
m x b matrix if X2 is Ux, otherwise NULL
p-list of a2-vectors for X1 coefficients. Can be NULL
a b x p matrix of current values for beta
b x p matrix for BayesC priors for beta2. Can be NULL
b x p matrix for BayesC priors for beta2. Can be NULL,
b x p matrix for BayesC priors for beta2. Can be NULL
List with elements:
alpha1 a1 x p matrix of alpha1
alpha2 concatenated vector of alpha2 for all traits
beta b x p matrix of beta
Y_prec p x 1 vector of Y_prec
beta2_alpha b x p matrix (optional)
beta2_delta_ b x p matrix (optional)