mediation
mediation copied to clipboard
R package mediation
I'm running two mediations on the same data, once using prior (sampling) weights when fitting the models (through the `survey` package), and once without those prior weights (just using the...
This works fine with boot=F, but throws an error when boot=T. A real corner case, I admit: ``` r library(mediation) #> mediation: Causal Mediation Analysis #> Version: 4.5.0 test
I recently updated R and my packages and the below code, which was previously working, is no longer working: ``` fit.dv
I am using the mediations() and amelidiate() functions to estimate causal mediated effects with 5 imputed datasets. After running the amelidiate() function on the 5 mediation analyses from the mediations()...
[Error in Surv(time, event) : cannot find object "time"] in survreg() Here I am doing mediation analysis among X, Y, and m. Here model.m is linear model and model.y is...
I want to do a mediation analysis, the outcome model is a survival model, but the document of this packages shows the outcome model can be survreg object instead of...
I have a question regarding the functionality of the medsens function. I am conducting a causal mediation analysis with a binary outcome and a continous mediator. My data is subject...
I was trying to fit a multilevel mediation analysis with crossed random factors using the mediate function from the mediation package in R. For the med.fit and out.fit models, I...
Using the mediate function (please see my code below), I receive the following error message. I would like to estimate a multilevel mediation for the following 2x5 mixed design. While...
I am conducting a mediation analysis with multiply imputed 30 data sets using "amelidiate {mediation}". variables: mediators= m,outcome=y, treatment=rep(e,30),covariates=z, control_val=a0, treat_val=a1, medout