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"))
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"))