posterior_summary | R Documentation |
This function takes the log posterior probability of the data (posterior likelihood) for the various cases, the log prior case probabilities, and returns log posterior odds.
posterior_summary(ln_prob_data, ln_prior_c, c_numerator)
ln_prob_data |
Log posterior likelihoods under the various models, returned by bmediatR(). |
ln_prior_c |
Log prior case probabilities. If posterior_summary() is being used for a non-default posterior odds summary, the log prior case probabilities used with bmediatR() are stored in its output. |
c_numerator |
The index of cases to be summed in the numerator of the posterior odds. Cases, their order, and likelihoods are provided in model_info(). |
posterior_summary
returns a list containing the following components:
ln_post_c |
a matrix with posterior probabilities of each causal model for each candidate mediator. |
ln_post_odds |
a matrix with posterior odds of individual models or combinations of models for each candidate mediator. |
ln_prior_odds |
a single row matrix with prior odds of individual models or combinations of models. |
ln_ml |
the natural log of the marginal likelihood. |
posterior_summary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.