Hi,
I want to calculate a two sample t-test and include age as covariate. Is it correct to just add two textfiles in the Text covariates menu in the same order as my groups in Group images. The textfiles for every group have the covariate (age) for every person in the rows in the same order as the images of the subjects?
For example
Group Images | Text Covariates
Group1 | AgeGroup1.txt
Group2 | AgeGroup2.txt
Re: [RFMRI] Age as covariate
Great, thanks!
Great, thanks!
just two quick follow up questions:
1.Will the covariates be centered automatically or is it necessary to do this before?
2. Is it possible to add a second covariate like gender in the same step? If yes, should it be in der form of e.g. 0 for male, 1 for female and in the following format:
Group Images | Text Covariates
Group1 | AgeGroup1.txt
| GenderGroup1.txt
Group2 | AgeGroup2.txt
| GenderGroup2.txt
Re: [RFMRI] Age as covariate
Institute of Psychology, Chinese Academy of Sciences
16 Lincui Road, Chaoyang District, Beijing 100101, China
error message
I see, thanks!
I have some problems making this work without the GUI though. Othercovariates is a 2x1 cell where rows correspond to groups and the entries of the cells are subject x covariates double arrays, i.e. age and gender in the columns and the rows represents subjects (e.g. 100 x 2). I have no covariate image files and I initialize it as follows:
Hi David,
Hi David,
DependentDirs should be 2 by 1 cells as well. Within each cell, should be a
a 4D .nii file name, or
a directory, or
a cell of filenames.
Best,
Chao-Gan
Thanks for the answer.
Thanks for the answer.
DependentDirs, OutputName and MaskFile are in the correct form, since it works without the covariate cell at the end. But when adding the covariate cell, I get this error.
I looked at y_TTest2_Image and I think my covariates cell (OtherCovariates) is interpreted as a cell of covariate Images (CovariateDirs) instead of a cell with the text covariates. In line 46, it expects the variable CovariateDirs to be non empty and the if condition gets executed and produces the error. But CovariateDirs should be empty since I only have text covariates. So it should start reading these files at line 58, since the variable OtherCovariates is not empty.
Is it somehow possible to only read OtherCovariates while leaving CovariateDirs empty?
Hi David,
Hi David,
If you want to skip "CovariateDirs". You should put "[]" at the position of "CovariateDirs".
Best,
Chao-Gan
multiple columns in covariate text file?
Should be:
Should be:
group1_run1_cov.txt
group1_run2_cov.txt
group2_run1_cov.txt
group2_run2_cov.txt
In each .txt file, there are 2 columns (cov1 and cov2).
problem with text file delimiters
Hi Dr. Yan,
Thanks for your response. I had already tried that but it won't read in the values correctly (Space and Enter do not work). Can you please clarify what is the delimiter to be used in Notepad in order for two columns to be read in? Alternatively, could you please send a copy of such a file so that I can copy-and-paste the delimiter from the file contents?
Thank you,
Felix
Re: [RFMRI] Age as covariate
--
Deputy Director, Magnetic Resonance Imaging Research Center
Institute of Psychology, Chinese Academy of Sciences
16 Lincui Road, Chaoyang District, Beijing 100101, China
setpath issue?
Hi Dr. Yan,
Tab and Enter did work, but only after I opened BrainNet Viewer. I'm using Windows 10 Pro x64 (Matlab R2017b). It's possible I did not arrange the paths correctly or place toolbox folders in the correct directories after the recent upgrade from R2017a to R2017b, which reset my local user \Documents\MATLAB folder. If you can offer any guidance here I'd really appreciate it, otherwise, it looks like I have a temporary solution.
Thank you,
Felix
Please make sure you have no
Please make sure you have no spaces in all your paths regarding matlab.
C:\Program Files\MATLAB\...
You'd better move MATLAB to a
You'd better move MATLAB to a directory without spaces. Toolboxes' directories are OK.
unsuccessful
Hi Xiao,
Thanks for your advice. I tried this, unfortunately I still need to load BrainNet Viewer from within spm8 for some of the Statistical Analysis procedures from the DPABI suite to work. The only other potential source of the problem that I can think of is the folder path for the location where the data are stored (on a separate drive from the Matlab folders), which does include spaces, but that's not something I can change because it is an institutional directory for which I do not have administrative privileges. It's not ideal, but for now I am focusing on getting my results so I will use the temporary solution, then I will go back and find a fix.
Many thanks,
Felix