The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Version: 1.0.0
Copyrights reserved by:
First author (creator): Zhou Tianbao (Michael Zhou) michaelzhou@buaa.edu.cn, <ORCID: 0000-0001-6782-626X>;
Second author (advisor): Li Xinghao lixinghao@bjfu.edu.cn;
Corresponding author (supervisor): Liu Lin*, liulin@pku.edu.cn
Institution: School of Government, Peking University, Beijing, China.
This package realizes a universal estimation approach that accommodates multi-category variables and effect scales, making up for the deficiencies of the existing approaches when dealing with non-binary exposures and complex models. The estimation via bootstrapping can simultaneously provide results of causal mediation on RD, OR and RR scales with tests of the effects’ difference. The estimation is also applicable to many other settings, e.g., moderated mediation, inconsistent covariates, panel data, etc. The high flexibility and compatibility make it possible to apply for any type of model, greatly meeting the needs of current empirical researches.
Users can install the development version of package “unvs.med” through R code:
install.packages("unvs.med")
This is an example based on the test data which shows you how to estimate causal mediation effects through this package:
library(unvs.med)
data(testdata)
# Fitting mediator's model
=glm(med~exp+C1+C2+C3, data=testdata, family=binomial)
med_model
# Fitting outcome's model
=lm(out~med*exp+C1+C2+C3, data=testdata)
out_model
# Running formal estimation via bootstrapping
= FormalEstmed (med_model=med_model, out_model=out_model,
r11 data=testdata, exposure = "exp")
# Viewing results in short form and on RD scales
summary(r11)
## Plot of PNED and TNDE on RD scales
plot(r11)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.