Description Usage Arguments Details Value
These methods fit the regression model y = Xb + e, where elements of e are i.i.d. N(0,s^2), and b is a pvector of effects to be estimated. The assumption is that b has exactly one nonzero element, with all elements equally likely to be nonzero. The prior on the coefficient of the nonzero element is N(0,V).
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  single_effect_regression(
y,
X,
V,
residual_variance = 1,
prior_weights = NULL,
optimize_V = c("none", "optim", "uniroot", "EM", "simple"),
check_null_threshold = 0
)
single_effect_regression_rss(
z,
Sigma,
V = 1,
prior_weights = NULL,
optimize_V = c("none", "optim", "uniroot", "EM", "simple"),
check_null_threshold = 0
)
single_effect_regression_ss(
Xty,
dXtX,
V = 1,
residual_variance = 1,
prior_weights = NULL,
optimize_V = c("none", "optim", "uniroot", "EM", "simple"),
check_null_threshold = 0
)

y 
An nvector. 
X 
An n by p matrix of covariates. 
V 
A scalar giving the (initial) prior variance 
residual_variance 
The residual variance. 
prior_weights 
A pvector of prior weights. 
optimize_V 
The optimization method to use for fitting the prior variance. 
check_null_threshold 
Scalar specifying threshold on the logscale to compare likelihood between current estimate and zero the null. 
z 
A pvector of z scores. 
Sigma 

Xty 
A pvector. 
dXtX 
A pvector containing the diagonal elements of

single_effect_regression_ss
performs singleeffect
linear regression with summary data, in which only the statistcs
X^Ty and diagonal elements of X^TX are provided to the
method.
single_effect_regression_rss
performs singleeffect linear
regression with z scores. That is, this function fits the
regression model z = R*b + e, where e is N(0,Sigma),
Sigma = residual_var*R + lambda*I, and the b is a pvector of
effects to be estimated. The assumption is that b has exactly one
nonzero element, with all elements equally likely to be nonzero.
The prior on the nonzero element is N(0,V). The required
summary data are the pvector z
and the p by p matrix
Sigma
. The summary statistics should come from the same
individuals.
A list with the following elements:
alpha 
Vector of posterior inclusion probabilities;

mu 
Vector of posterior means (conditional on inclusion). 
mu2 
Vector of posterior second moments (conditional on inclusion). 
lbf 
Vector of logBayes factors for each variable. 
lbf_model 
LogBayes factor for the single effect regression. 
single_effect_regression
and single_effect_regression_ss
additionally output:
V 
Prior variance (after optimization if 
loglik 
The loglikelihood, \log p(y  X, V). 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.