Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model combination error using medsens on a mediate object derived from amelidiate (multiply-imputed data) #56

Open
vriesTR opened this issue Apr 18, 2023 · 1 comment

Comments

@vriesTR
Copy link

vriesTR commented Apr 18, 2023

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 to missing data and I have opted to use multiple imputation in my workflow (through MICE). The mediations package workflow allows me to conduct the mediation analysis on imputed data in a very straightforward manner (through the mediations and amelidiate functions). The summary and plot functions work appropiately; I have obtained the results of the main analysis.

I am now in the stage where I would like to pass the mediate object (that results from the amelidiate function, which I use to pool results from the imputed datasets) through the medsens function in order to conduct the sensitivity analysis. Unfortunately, this is where I run into issues. I receive an error message which mentions that the model combination used in my analysis is not supported. The model combination should however be supported if I am not mistaken (continous mediator, binary outcome. Families in the mediations call are correctly specified as "gaussian" and "binomial", respectively; the mediate object confirms this. No treatment-mediator interaction was specified).

The question: should the medsens function in theory support the workflow described in the vignet accompanying the 'mediation' package on multiple-imputed data? I have no issues running the workflow on the non-imputed data, nor when I run the analysis on the individual imputed datasets (I have not gone through pooling the results from the individual analyses so far).

Looking forward as to any reply. Thanks in advance!

@tingleyd
Copy link
Collaborator

Hi, Medsens was not setup to take in the output of ameldiate. It should be possible, but not as it is currently setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants