I think I am talking from the hearts of all PhD students around here: That's invaluable! Thank you so much for doing this and sharing your workflow. One thing missing from your repository though is the dependencies aren't nicely installed (for example the nifti one needs to be on the same folder as your lib). I am happy to contribute to create an environment for that, if needed! :)
Hi Ioannis, thanks for the message. It means a lot to me. You're right, the dependencies for this repo are still in a mass. It had originally begun as a side project for researchers in our lab, but I'm happy to see more people are interested in the code. I'm more than happy to work with you, so please PR any suggestions to the github repo. Thanks!
Slowly getting there but here is some update on nifti-snapshot, which is one of the dependencies of randomise_summary nifti-snapshot.readthedocs.io/en/latest/
@@kchox thanks for your answer! Sorry it took my sometime to get back because the comments were disabled! I will get back to you very soon, hopefully with a PR!
Hi Monica, thanks for watching the video and leaving the comment🙏🙏🙏 Your comment is really important because demean can change the result. It's correct to demean most of the times, but demeaning doesn't change the result for [1 -1 0] or [-1 1 0] contrast. So it would still be safe to include demean step for most of the contrast. I should include demean part in the next video. Thanks for letting me know 🙏🙏🙏 Below are the two good reference pages for demean. www.google.com/amp/s/mumfordbrainstats.tumblr.com/post/644852603831844864/mean-centering-document-updated/amp www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=FSL;c5cc1cdc.1301
@@kchox Thanks so much for the prompt reply and for the link! I have two follow up questions: 1. I usually first convert the values of the covariate (i.e. age) to z-scores & then demean those values. I read somewhere long time ago about doing it and now I always do it. But now I’m not sure if that’s the correct thing to do? Should I be converting the values to z-scores or is that a mistake? 2. The -D option, should it be ONLY used when not including a constant (column of ones) in the model or is it ok to use always? Thanks!
👋Monica, 1. if the z-score is estimated using all of your samples in the stats, no need to demean again. www.jiscmail.ac.uk/cgi-bin/webadmin?A2=fsl;4006852a.1402 2. Hmm sorry, I'm not entirely sure about this. The FSL website says -D is for demeaning, but if you already demeaned your matrix (like z-score transformed as you mentioned), I think using this option shouldn't make a difference in the result. Can you let me know if using -D on the already demeaned matrix makes difference in the output, please? Thanksss!
@@kchox Thanks for the link to that post about z-scores. It definitely helps a lot. For what I've been reading in the tutorials it seems that -D has to be used if one don't include the column of ones (the intercept) in the model, but if one includes the intercept, then not use the -D. But that's just my take out from what I read. Not 100% sure.
Thanks for the kind guide video. I have a question. 1. If I want to use more than one variable (although only one age is used in the video), can I increase it as if I put 'age covariate' in the .mat and .con files? Can I add 0 and 0 in the .con file, respectively, and add them as 'age variable' in the .mat file? 2. What should I do if I want to include a binary variable (sex, disease presence, etc.) rather than a continuous variable like age?
Thanks Sang Won🙏 1. Yes example col order: group1 group 2 age sex education mat 1 0 15 0 12 1 0 14 0 13 1 0 16 1 12 0 1 15 1 15 0 1 17 0 14 0 1 15 0 13 contrast 1 -1 0 0 0 1 -1 0 0 0 2. You can label binary variables as 0 and 1 as we do in GLM
Thank you so much for the video! I am still confused with the contrast matrix when you consider a confounding factor. You used (1, -1, 0) and (-1, 1, 0) in order to take account of "age", but intuitively, using "0" feels like "NOT taking account of/ negating" age. Could you explain why you can use 0 instead of 1 or -1?
@@kchox oh thank you for your prompt reply! I misunderstood that you used 0 to include the effect of age. Finally I could understand the contract metrics:))))
Hi kcho, thanks for your video could you please tell how to design the contrast if I want to compare difference among 4 groups and also what should I do for the subsequent contrast between every two groups? Thank you so much and look forward for your reply
Hi Kevin, thank you for the video. The scripts are surely helpful. I tried using it on my TBSS results but unfortunately it didn't work. Could you please help me regarding this. Thank you and best regards, Hamzah
@@kchox Thank you very much! What do you think about option -D (demeaning)? I mean, once I am using categorical and ordinal variables, is it the best option?
Thank you so much for making this video! - imaging PhD students everywhere
I think I am talking from the hearts of all PhD students around here: That's invaluable! Thank you so much for doing this and sharing your workflow. One thing missing from your repository though is the dependencies aren't nicely installed (for example the nifti one needs to be on the same folder as your lib). I am happy to contribute to create an environment for that, if needed! :)
Hi Ioannis, thanks for the message. It means a lot to me. You're right, the dependencies for this repo are still in a mass. It had originally begun as a side project for researchers in our lab, but I'm happy to see more people are interested in the code. I'm more than happy to work with you, so please PR any suggestions to the github repo. Thanks!
Slowly getting there but here is some update on nifti-snapshot, which is one of the dependencies of randomise_summary nifti-snapshot.readthedocs.io/en/latest/
@@kchox thanks for your answer! Sorry it took my sometime to get back because the comments were disabled! I will get back to you very soon, hopefully with a PR!
@@wizofe I'm not sure why the comment was disabled🙈Now the nifti_snapshot is available from pypi -pip install nifti_snapshot
I am SO grateful for the fact that you did this. Thank you so much.
Glad it was helpful!
This is absolutely fantastic. Thank you so much for taking the time to do this.
Hello Kevin, I am planning to watch all your video tutorials and obviously learn as much out of them as possible. Wish me luck....today is day one
Thank you so much, sunbae nim! I am going to check out other videos as well! :)
Nice talk and explained randomize completely.
Thank you very much for making this video :)
Great video. Thanks. I have a small question. In your example you didn’t demean age. Don’t you have to demean the values for that variable?
Hi Monica, thanks for watching the video and leaving the comment🙏🙏🙏 Your comment is really important because demean can change the result. It's correct to demean most of the times, but demeaning doesn't change the result for [1 -1 0] or [-1 1 0] contrast. So it would still be safe to include demean step for most of the contrast. I should include demean part in the next video. Thanks for letting me know 🙏🙏🙏
Below are the two good reference pages for demean.
www.google.com/amp/s/mumfordbrainstats.tumblr.com/post/644852603831844864/mean-centering-document-updated/amp
www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=FSL;c5cc1cdc.1301
@@kchox Thanks so much for the prompt reply and for the link! I have two follow up questions:
1. I usually first convert the values of the covariate (i.e. age) to z-scores & then demean those values. I read somewhere long time ago about doing it and now I always do it. But now I’m not sure if that’s the correct thing to do? Should I be converting the values to z-scores or is that a mistake?
2. The -D option, should it be ONLY used when not including a constant (column of ones) in the model or is it ok to use always?
Thanks!
👋Monica,
1. if the z-score is estimated using all of your samples in the stats, no need to demean again. www.jiscmail.ac.uk/cgi-bin/webadmin?A2=fsl;4006852a.1402
2. Hmm sorry, I'm not entirely sure about this. The FSL website says -D is for demeaning, but if you already demeaned your matrix (like z-score transformed as you mentioned), I think using this option shouldn't make a difference in the result. Can you let me know if using -D on the already demeaned matrix makes difference in the output, please? Thanksss!
@@kchox Thanks for the link to that post about z-scores. It definitely helps a lot. For what I've been reading in the tutorials it seems that -D has to be used if one don't include the column of ones (the intercept) in the model, but if one includes the intercept, then not use the -D. But that's just my take out from what I read. Not 100% sure.
🙏@@monicagiraldochica I'll also share if I come across or find out what the -D exactly do in future
Thanks for the kind guide video.
I have a question.
1. If I want to use more than one variable (although only one age is used in the video), can I increase it as if I put 'age covariate' in the .mat and .con files?
Can I add 0 and 0 in the .con file, respectively, and add them as 'age variable' in the .mat file?
2. What should I do if I want to include a binary variable (sex, disease presence, etc.) rather than a continuous variable like age?
Thanks Sang Won🙏
1. Yes
example
col order: group1 group 2 age sex education
mat
1 0 15 0 12
1 0 14 0 13
1 0 16 1 12
0 1 15 1 15
0 1 17 0 14
0 1 15 0 13
contrast
1 -1 0 0 0
1 -1 0 0 0
2. You can label binary variables as 0 and 1 as we do in GLM
Thank you so much for the video! I am still confused with the contrast matrix when you consider a confounding factor. You used (1, -1, 0) and (-1, 1, 0) in order to take account of "age", but intuitively, using "0" feels like "NOT taking account of/ negating" age. Could you explain why you can use 0 instead of 1 or -1?
Hi Asuka. You're right- I mean to take age into the account in the model, and by giving 0, it removes the effect from the linear model.
@@kchox oh thank you for your prompt reply! I misunderstood that you used 0 to include the effect of age. Finally I could understand the contract metrics:))))
Hi kcho, thanks for your video could you please tell how to design the contrast if I want to compare difference among 4 groups and also what should I do for the subsequent contrast between every two groups? Thank you so much and look forward for your reply
Thank you so much for your tutorial.
I wonder to know how you create mean-FA-freewater-skeleton and mean-freewater-skeleton?
You could use fslmeants, from FSL, on 4d maps to get the mean maps.
Hi Kevin, thank you for the video. The scripts are surely helpful. I tried using it on my TBSS results but unfortunately it didn't work. Could you please help me regarding this.
Thank you and best regards,
Hamzah
Thanks Hamzah- if you can leave details about your issue in using the code in the github issue, I'll try to have a look! Thanks
Hello, Kevin. I want to perform a multiple regression. How can I include an ordinal variable (which effect I want to regress out) ranging from 1 to 7?
I'd consider converting the covariate matrix using one hot encoding in the matrix and remove effects by including 0s in the contrast. Good luck🤞
@@kchox Thank you very much! What do you think about option -D (demeaning)? I mean, once I am using categorical and ordinal variables, is it the best option?
Im doing without tbss