Constructs a mixture prior for use with mvsusie().
Accepts one of three input types:
fitted_g: Output frommashr::mash(), which provides data-driven mixture weights and covariance matrices. This is the recommended approach for large R.mixture_prior: A list withmatrices(list of covariance matrices) and optionalweights.R: Number of outcomes, to auto-generate canonical covariance matrices (singletons + shared effects).
Usage
create_mixture_prior(
mixture_prior,
R,
null_weight = NULL,
weights_tol = 1e-10,
max_mixture_len = -1,
grid = NULL,
fitted_g = NULL,
include_indices = NULL,
...
)Arguments
- mixture_prior
A list of
(weights = vector(), matrices = list())where matrices is a list of prior covariance matrices.- R
Number of outcomes. Generates canonical covariance matrices via
create_cov_canonical(R).- null_weight
Weight for the null component in single effect models. For
fitted_g, defaults to the mash-estimated null weight. Usenull_weight = 0to override.- weights_tol
Filter out mixture components with weights smaller than
weights_tol.- max_mixture_len
Only keep the top priors by weight so that the list of mixture prior is of length
max_mixture_len. Usemax_mixture_len = -1to include all input weights after filtering byweights_tol.- grid
Numeric vector of scaling factors for the canonical covariance matrices (used only with
R). When provided, each canonical matrix is scaled by each grid value, producinglength(Ulist) * length(grid)mixture components. WhenNULL(default), unscaled canonical matrices are used directly.- fitted_g
The
fitted_gelement frommashr::mash()output. Must containUlist,grid,pi, andusepointmass. The estimated mixture weights are used directly.- include_indices
Post-process input prior to only include outcomes at these indices.
- ...
Other parameters passed to
mvsusieR:::create_cov_canonical(e.g.,singletons,hetgrid).
Value
A mash_prior object for use with mvsusie().