canlab / MediationToolbox

Single-level and multi-level mediation analyses for any kind of data, with bootstrap-based significance testing. Neuroimaging-oriented functions allow for mediation effect parametric mapping (mapping of mediation effects across the brain) and multivariate mediation.
https://canlabweb.colorado.edu/wiki/doku.php/help/mediation/m3_mediation_fmri_toolbox
83 stars 29 forks source link

Mediation with binary outcome #6

Closed JnsZmn closed 6 years ago

JnsZmn commented 6 years ago

Hi all, Many thanks for the handy and easy to use toolbox. I do however have a question. To what extent is the output generated by the toolbox meaningful for a simple mediation model with x = binary, m = continious and y = binary?

Many thanks in advance

JnsZmn commented 6 years ago

Found it thanks to Philip Augustus Kragel. The anwser is yes it can. You just have to 'logit' in the model. Seems to work fine for multilevel data as well.

[paths, stats] = mediation(X, Y_M, 'logit')