Description Usage Arguments Details Value Author(s) References Examples
mdn
conducts mediation analysis in terms of likelihood.
1 | mdn(fit.M, fit.Y, X, sig.level = 0.05, B = 0)
|
fit.M |
a fitted model object for mediator. It is an object from which
the function |
fit.Y |
a fitted model object for outcome. It can be of a class different from the model for the mediator |
X |
a character string of the name of the treatment variable. |
sig.level |
a numerical variable specifying the significance level for the test of the mediated effect. |
B |
an integer specifying the number of replicates used in the bootstrapping method for the confidence interval. Default value is 0 and bootstrapping is not conducted |
Necessary log-likelihoods are extracted from the two fitted models. Various effects
are then calculated. Significance of the mediated effect is known up to
whether it is larger or smaller than sig.level
. If it is larger, a 1
is reported; otherwise a 0 is reported. There is no p-value.
A list with class “mdn
” containing the following
components:
result |
a data frame containing the results of the
mediation analysis. The are five variables. They include estimates of
various effects and lower and upper bounds of the boostrap confidence
interval at level (1- |
test |
a character string specifying the test statistic used for the mediated effect |
Test |
a numerical value of 0 or 1. If the specified test statistic is significant, its value is 1; otherwise its value is 0 |
sig.level |
a numerical variable specifying the significance level for the test of the mediated effect. |
Sample.size |
number of subjects in the data |
B |
an integer specifying the number of replicates used for the bootstrapping |
Kai Wang <kai-wang@uiowa.edu>
Berger, R.L. (1997) Likelihood ratio tests and intersection-union tests. Advances in statistical decision theory and applications. Birkh\"auser Boston, 225-237.
Wang, K. (2019) Likelihood-based analysis of the statistical effects of a treatment on an outcome. Submitted.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.