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

Issue of unequal length of variables in Mediation_brain #26

Open
Apurva1292 opened this issue Feb 21, 2022 · 0 comments
Open

Issue of unequal length of variables in Mediation_brain #26

Apurva1292 opened this issue Feb 21, 2022 · 0 comments

Comments

@Apurva1292
Copy link

Apurva1292 commented Feb 21, 2022

Hello everyone,

I am new to running mediation_brain and encountered an issue.
While running mediation_brain, we intend to use brain images as the mediator with X independent variable and Y dependent outcome score.
In the run at the stage of mediator search, it reads the brain images list provided as mediators and creates an array with the values of every voxel in it.
In the mediation part, inputs get set up that matches the length of all three inputs X, Y, and M. At this point, the error occurs as the unequal length of the variables X, Y and M the following:


Mask: /media/diabpro/New Volume/pmnsFMRIanalysis/fMRI_data/wau_fMRI_mask.nii.gz
Rank data: No

Reading data. Direct calls to spm_defauts are deprecated.
Please use spm('Defaults',modality) or spm_get_defauStatistics.

===============================================

Slice 1 : 6444 voxels in-mask
Testing 6444 valid columns of 6444 total in matrix - current: 1
The mediation output below (and in the figures) is shown for
the first valid voxel in the brain.
It is intended to give you an idea of what the
variables and output look like so you can check 1
Error using mediation>setup_inputs (line 1223)
X, Y, and M must be equal in length

Error in mediation (line 183)
setup_inputs(X, Y, M, varargin);

Error in mediation_search (line 143)
[paths, stat] = mediation(X, Y, M(:,region), varargin{:}, 'persistent', extra_args{:},
'pvals_for_boot', pvals_for_boot, 'arorder', arorder);

Error in mediation_brain/process_slice (line 314)
slice_results = mediation_search('M', X, Y, M(:,whvox), varargin{:});

Error in mediation_brain (line 276)
process_slice();

Error in PMNS_HHLH_FMRI_mediation (line 32)
med_stats =mediation_brain(xx{1}, yy{1}, M1, 'mask', mask, 'plots', 'verbose', 'boot');

Any suggestions on how we can resolve the issue or find out more about the details of the mediation would be much appreciated.

Thank you
Apurva

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

1 participant