Description Usage Arguments Details Value Author(s)
Fit CAUSE sharing and causal models, calculate ELPD test statistic and estimate posteriors
Implementation of CAUSE described in Morrison et al. (2020)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
X |
An object of class cause_data containing data for the two traits. |
param_ests |
Object of class cause_params output by est_cause_params. This contains estimates of the mixing proportions and an estimate of rho, the correlation in test statistics that is due to overlapping samples or population structure. |
variants |
A vector of variants to include in the analysis. |
pval_thresh |
Argument supplying the trait M p-value threshold for including a variant. If you would like to use all variants in 'variants' without a threshold, use pval_thresh = 1. |
sigma_g |
Parameter specifying the prior distribution of gamma and eta. gamma ~ N(0, sigma_g), eta ~ N(0, sigma_g). |
qalpha, qbeta |
Parameters defining the prior distribution of q. q ~ Beta(qalpha, qbeta) |
max_q |
Largest value of q to be allowed. If max_q < 1 then the prior will be truncated. |
force |
If true, do not give an error if parameter estimates did not converge. |
n_start_gamma_eta, n_start_q |
Number of starting bins for grid approximation. You shouldn't need to change these but if you are suspicious about your results, you might try increasing them. It's best to use odd numbers. |
This function estimates posterior distributions for gamma, eta, and q under the sharing and causal models and computes a test statistic comparing the two models. The returned object contains
A note about arguments: The SNPs used to compute posteriors can be specified through two arguments, 'variants' and 'pval_thresh'. 'pval_thresh' was added in a later version and for compatibility with old code, the default value is set to 1. However, we recommend fitting posteriors with some p-value threshold in effect using either or both of the 'variants' and 'pval_thresh' arguments. The new argument makes it more convenient to do this without a separate step.
sharing, causal: posterior estimates under model.
elpd: A data frame giving estimated difference in elpd between the sharing and causal models. A negative delta_elpd favors the model in the "model 2" column. A positive delta_elpd favors the model in the "model 1" column.
data: The data used to compute the object. This data frame also contains posterior estimates for each variant of acting through U under both models.
sigma_g: Prior variance of gamma and eta. This value is chosen based on the data by default but can be supplied using the sigma_g parameter in the function call.
qalpha, qbeta: The prior distribution of q is Beta(qalpha, qbeta)
Functions summary() and plot() can be used with cause objects. See ?summary.cause and ?plot.cause
An object of class "cause" that contains posterior estimates for causal and sharing models as well as results of the model comparison test. See Details.
Jean Morrison <jvmorr@umich.edu>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.