-
Notifications
You must be signed in to change notification settings - Fork 29
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
Dimension not match Error when bootstrapping Joint PDM #17
Comments
Hi Peng,
I checked with Martin Lindquist, who says:
The value of p looks weird to me. It is defined as
p = size(Dt,2);
where Dt is the inverse weight projection matrix (B x voxels). Hence p should be #voxels, not 10*#voxels.......
Best,
Martin
… On Dec 23, 2020, at 9:45 PM, Peng Ren ***@***.***> wrote:
There's one dimension not match error when running multivaraiteMediation function, and the error occurs in BootPDMJoint.m:
worig = worig.*repmat(sign(torig(3,:)),p,1);
Here, I am using 10 PDMs, the dimensions info are: worig=#voxles1, torig=510, p=10*#voxels.
After this, I get worig=#voxels1 and repmat(sign(torig(3,:)),p,1)=#voxels10, they are not matched for .* indeed.
However, there's no error in previous steps, and I'm not sure about what happens here, and also not quite clear about the mathematics behind it, could you give me some idea?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#17>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABPY7LHRLQSXN573P26Q7I3SWKTLPANCNFSM4VHWB5EQ>.
|
Dear Prof.Wager, Sorry for the mistake in my original description, P surely equals #voxels, and the error comes from worig=#voxels * 1, however, repmat(sign(torig(3,:)),p,1)=#voxels * 10 cause sign(torig(3,:))=5 * 10. I guess the original goal is to calculate the elementwise product between worig and each column of repmat(sign(torig(3,:)),p,1)=#voxels * 10, right? In this case, I find bsxfun(@times,worig,repmat(sign(torig(3,:)),p,1)) works. Please forgive me if there's any mistake. Best regards, |
Dear Prof.Wager, Just to make sure about the pipeline of Multivariate Mediation Analysis in your recent "Multiple Brain Networks Mediating Stimulus–Pain Relationships in Humans" article to avoid vital mistakes. These are the ideas I summarize from reading the article and emailing Prof.Lindquist. Any instruction would be much appreciated!
Is this the case? Seasons Greeting, |
There's one dimension not match error when running multivaraiteMediation function, and the error occurs in BootPDMJoint.m:
worig = worig.*repmat(sign(torig(3,:)),p,1);
Here, I am using 10 PDMs, the dimensions info are: worig=#voxles * 1, torig=5*10, p=10 * #voxels.
After this, I get worig=#voxels * 1 and repmat(sign(torig(3,:)),p,1)=#voxels * 10, they are not matched for . * indeed.
However, there's no error in previous steps, and I'm not sure about what happens here, and also not quite clear about the mathematics behind it, could you give me some idea?
The text was updated successfully, but these errors were encountered: