Prints the estimated parameters (numerical summaries of the marginal posterior distributions).
mlm_summary(
mod = NULL,
level = 0.95,
pars = c("a", "b", "cp", "me", "c", "pme"),
digits = 2
)
A stanfit
object obtained from mlm()
"Confidence" level; Defines the limits of the credible intervals. Defaults to .95 (i.e. displays 95% CIs.)
Parameters to summarize. Defaults to main average-level parameters. See Details for more information.
How many decimal points to display in the output. Defaults to 2.
A data.frame
summarizing the estimated multilevel
mediation model:
Name of parameter
Mean of parameter's posterior distribution.
Median of parameter's posterior distribution.
Standard deviation of parameter's posterior distribution.
The lower limit of Credible Intervals.
The upper limit of Credible Intervals.
Number of efficient samples.
Should be 1.00.
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:
Regression slope of the X -> M relationship.
Regression slope of the M -> Y relationship.
Regression slope of the X -> Y relationship. (Direct effect.)
Mediated effect (\(a * b + \sigma_{{a_j}{b_j}}\)).
Total effect of X on Y. ( \(cp + me\) )
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:
Standard deviation of subject-level a_j
s.
Standard deviation of subject-level b_j
s.
Standard deviation of subject-level c\'_j
s.
Estimated covariance of a_j
and b_j
s.
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))
).