-
Notifications
You must be signed in to change notification settings - Fork 32
Issue running mediation_brain #25
Description
Hello everyone,
This is the first time I'm trying to run a mediation analysis using this toolbox and I've run into some trouble.
Entering this line of code in matlab (Version 2021b)
results = mediation_brain(X,Y,M,'names',names,'mask', mask, 'noverbose');
I get the following error (copied below) which at first glance seems to be related to the tcdf code from matlab... but is it really required to have the Deep Learning Coder and the Deep Learning Toolbox installed for running the mediation? Because this is what I found online as suggestion to resolve part of the error message "Unable to resolve the name coder.internal.sxalloc".
Unfortunately I don't currently have the Deep Learning Toolbox for matlab ..... Any help is much appreciated, as running this analysis would help me finish a project :-)
Thank you and best wishes,
Vanessa
#------------
Mask: C:\Matlab\CanlabCore-master\CanlabCore-master\CanlabCore\canlab_canonical_brains\Canonical_brains_surfaces\gray_matter_mask.img
Rank data: No
Reading data.Direct calls to spm_defauts are deprecated.
Please use spm('Defaults',modality) or spm_get_defauStatistics.
Slice 1 : 3318 voxels in-mask Unable to resolve the name coder.internal.sxalloc.
Error in tcdf (line 16)
p = coder.internal.sxalloc([true,isfloat(v)],x,v);
Error in mediation>get_ols_stats (line 1511)
stats.p = min(1, (2 .* (1 - tcdf(abs(stats.t), stats.df))));
Error in mediation (line 305)
stats = get_ols_stats(paths(i,:) , sterrs(i,:), n(i), num_additionalM); % setup dummy stats structure
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 mediation_M3_1000 (line 158)
results = mediation_brain(X,Y,M,'names',names,'mask', mask, 'noverbose');