kosukeimai / mediation

R package mediation
58 stars 29 forks source link

mediations cannot find "weights" #35

Open nerissanance opened 3 years ago

nerissanance commented 3 years ago

I am running into an issue when using mediations command to run the mediation analysis on multiple imputation data. I have weights in each of my datasets, but the packages seems to not be location them, as the error reads: Error in eval(extras, data, env) : object 'weight' not found

The variable ipw_response_t are the truncated weights and are a numeric column in each of my imputed datasets. I specify it as below: olsols <- mediations(datasets, treatment, mediators, outcome, covariates, families=c("gaussian","gaussian") , interaction=FALSE , conf.level=.95 , sims=100,weights=c("ipw_response_t"))

jschoeneberger commented 1 year ago

I too have this same exact problem. Given i'm experiencing this 1 year later, I'm assuming there's been no movement to address the issue...?