Hi,
I’ve been struggling to get a 3dMEMA script to read in my covariates file. I have 1 condition, 2 groups, and 2 covariates (1 continuous, 1 dummy coded). The input files have multiple sub-briks and I’ve selected the b-coefficient (#2) and t-stat (#3) subbriks in the file to feed into MEMA. I get 2 different errors depending on whether I specify values to center the covariates at:
-
if I specify what value I want the covariates centered to, this error: "warning in read.AFNI.matrix(1op$covFN, 1op$covName, allsubj): Rows “[lists all my subjects]” does not have an entry. Warning in read.MEMA.opts.batch(args, ber = 0) : Mismatch between number of covariates " " (0 * 2 ) and number of center values 4.
-
If I take out the covariate centering option to let it mean center (just to try to get it to run through), I get this error: “error in cbind(1op$xMat, 1op$covData): number of rows in matrices must match (see arg 2) Calls: process.MEMA.opts → as.matrix → cbind”
The script runs fine if I leave out the covariate file, suggesting MEMA is reading the subject data without a problem. I’ve attached the script (paired down to just 5 subjects in each group as I troubleshot the covariates issue) and covariates file. Any guidance here would be much appreciated, and many thanks for offering this mixed effects model for fMRI data!
(I’ve tried every combination of covariate file format with and without labels, and spaces vs. tab to separate covariate columns without success).
Cheers,
Laurel
script:
#!/bin/tcsh
3dMEMA -prefix foo2
-groups PI TYP
-set PI SB021_fu1 /space/raid3/data/totten/SB/SB021_fu1/resting/SB021_fu1.results/SB021_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB021_fu1/resting/SB021_fu1.results/SB021_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB025_fu1 /space/raid3/data/totten/SB/SB025_fu1/resting/SB025_fu1.results/SB025_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB025_fu1/resting/SB025_fu1.results/SB025_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB030_fu1 /space/raid3/data/totten/SB/SB030_fu1/resting/SB030_fu1.results/SB030_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB030_fu1/resting/SB030_fu1.results/SB030_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB031_fu1 /space/raid3/data/totten/SB/SB031_fu1/resting/SB031_fu1.results/SB031_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB031_fu1/resting/SB031_fu1.results/SB031_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB041_fu1 /space/raid3/data/totten/SB/SB041_fu1/resting/SB041_fu1.results/SB041_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB041_fu1/resting/SB041_fu1.results/SB041_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
-set TYP SB001 /space/raid3/data/totten/SB/SB001/resting/SB001.results/SB001_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB001/resting/SB001.results/SB001_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB007_fu1 /space/raid3/data/totten/SB/SB007_fu1/resting/SB007_fu1.results/SB007_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB007_fu1/resting/SB007_fu1.results/SB007_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB011_fu1 /space/raid3/data/totten/SB/SB011_fu1/resting/SB011_fu1.results/SB011_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB011_fu1/resting/SB011_fu1.results/SB011_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB034_fu1 /space/raid3/data/totten/SB/SB034_fu1/resting/SB034_fu1.results/SB034_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB034_fu1/resting/SB034_fu1.results/SB034_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
SB036_fu1 /space/raid3/data/totten/SB/SB036_fu1/resting/SB036_fu1.results/SB036_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[2]’ /space/raid3/data/totten/SB/SB036_fu1/resting/SB036_fu1.results/SB036_fu1_fc_amyg50_PIresting_6_2_16_blur9+tlrc’[3]’
-max_zeros .10
-HKtest
-model_outliers
-residual_Z
-covariates foo4.txt
-covariates_model center=different slope=same \
end
covariates file foo4.txt:
0.071192103 1
0.743101385 1
0.177671454 0
0.155026777 0
0.032331369 0
0.25434857 1
0.123312227 0
0.137457635 0
0.054449535 1
0.42148894 1