Description Usage Arguments Details Value Author(s)

Prints the estimated parameters (numerical summaries of the marginal posterior distributions).

1 2 | ```
mlm_summary(mod = NULL, level = 0.95, pars = c("a", "b", "cp", "me", "c",
"pme"), digits = 2)
``` |

`mod` |
A |

`level` |
"Confidence" level; Defines the limits of the credible intervals. Defaults to .95 (i.e. displays 95% CIs.) |

`pars` |
Parameters to summarize. Defaults to main average-level parameters. See Details for more information. |

`digits` |
How many decimal points to display in the output. Defaults to 2. |

After estimating a model (drawing samples from the joint posterior
probability distribution) with `mlm()`

, show the estimated results
by using `mlm_summary(fit)`

, where `fit`

is an object containing
the fitted model.

The function shows, for each parameter specified with `pars`

,
the posterior mean, and limits of the Credible Interval as specified
by `level`

. For example, `level = .91`

shows a
91% Credible Interval, which summarizes the central 91% mass of
the marginal posterior distribution.

By default, `mlm()`

estimates and returns a large number of parameters,
including the varying effects, and their associated standard deviations.
However, `mlm_summay()`

by default only displays a subset of the
estimated parameters:

- a
Regression slope of the X -> M relationship.

- b
Regression slope of the M -> Y relationship.

- cp
Regression slope of the X -> Y relationship. (Direct effect.)

- me
Mediated effect (

*a * b + σ_{{a_j}{b_j}}*).- c
Total effect of X on Y. (

*cp + me*)- pme
Percent mediated effect.

The user may specify `pars = NULL`

to display all estimated parameters.
Other options include e.g. `pars = "tau"`

to display the varying
effects' standard deviations. To display all the group-level parameters
(also known as random effects) only, specify `pars = "random"`

.
With this argument, `mlm_summary()`

prints the following parameters:

- tau_a
Standard deviation of subject-level

`a_j`

s.- tau_b
Standard deviation of subject-level

`b_j`

s.- tau_cp
Standard deviation of subject-level

`c\'_j`

s.- covab
Estimated covariance of

`a_j`

and`b_j`

s.- corrab
Estimated correlation of

`a_j`

and`b_j`

s.

To learn more about the additional parameters, refer to the Stan code
(`cat(get_stancode(fit))`

).

A `data.frame`

summarizing the estimated multilevel
mediation model:

- Parameter
Name of parameter

- Mean
Mean of parameter's posterior distribution.

- Median
Median of parameter's posterior distribution.

- SE
Standard deviation of parameter's posterior distribution.

- ci_lwr
The lower limit of Credible Intervals.

- ci_upr
The upper limit of Credible Intervals.

- n_eff
Number of efficient samples.

- Rhat
Should be 1.00.

Matti Vuorre [email protected]

bmlm documentation built on June 7, 2018, 5:04 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.