Error: $ operator is invalid for atomic vectors

Hi Teacher Chen,

The question that we asked you when you were in China has still bothered me.
I have 2 within-subject variables , name(self,other) and Time, 17 subjects. I want to get the effect of self - other on the basis of 6 time points.

Then I ran 3dMVM, but got this ERROR

Error: $ operator is invalid for atomic vectors.

I am confused because there is no any $ in my script.

Here is my script:
#!/bin/tcsh

3dMVM -prefix ./group_result/name_result/task1_output.MVM -jobs 2
-bsVars ‘1’
-wsVars ‘nameTime’
-num_glf 3
-glfLabel 1 contrast_Time -glfCode 1 'name : 1
self - 1other Time : 1t0 & 1t1 & 1t2 & 1t3 & 1t4 & 1t5’
-glfLabel 2 self_Time -glfCode 2 'name : 1
self Time : 1t0 & 1t1 & 1t2 & 1t3 & 1t4 & 1t5’
-glfLabel 3 other_Time -glfCode 3 ‘name : 1other Time : 1t0 & 1t1 & 1t2 & 1t3 & 1t4 & 1*t5’
-dataTable
Subj name Time InputFile
s1 self t0 subj001/beta/subj001_task1_self+tlrc’[0]’
s1 self t1 subj001/beta/subj001_task1_self+tlrc’[1]’
s1 self t2 subj001/beta/subj001_task1_self+tlrc’[2]’
s1 self t3 subj001/beta/subj001_task1_self+tlrc’[3]’
s1 self t4 subj001/beta/subj001_task1_self+tlrc’[4]’
s1 self t5 subj001/beta/subj001_task1_self+tlrc’[5]’
s1 other t0 subj001/beta/subj001_task1_other+tlrc’[0]’
s1 other t1 subj001/beta/subj001_task1_other+tlrc’[1]’
s1 other t2 subj001/beta/subj001_task1_other+tlrc’[2]’
s1 other t3 subj001/beta/subj001_task1_other+tlrc’[3]’
s1 other t4 subj001/beta/subj001_task1_other+tlrc’[4]’
s1 other t5 subj001/beta/subj001_task1_other+tlrc’[5]’
s2 self t0 subj003/beta/subj003_task1_self+tlrc’[0]’
s2 self t1 subj003/beta/subj003_task1_self+tlrc’[1]’
s2 self t2 subj003/beta/subj003_task1_self+tlrc’[2]’
s2 self t3 subj003/beta/subj003_task1_self+tlrc’[3]’
s2 self t4 subj003/beta/subj003_task1_self+tlrc’[4]’
s2 self t5 subj003/beta/subj003_task1_self+tlrc’[5]’
s2 other t0 subj003/beta/subj003_task1_other+tlrc’[0]’
s2 other t1 subj003/beta/subj003_task1_other+tlrc’[1]’
s2 other t2 subj003/beta/subj003_task1_other+tlrc’[2]’
s2 other t3 subj003/beta/subj003_task1_other+tlrc’[3]’
s2 other t4 subj003/beta/subj003_task1_other+tlrc’[4]’
s2 other t5 subj003/beta/subj003_task1_other+tlrc’[5]’
s3 self t0 subj005/beta/subj005_task1_self+tlrc’[0]’
s3 self t1 subj005/beta/subj005_task1_self+tlrc’[1]’
s3 self t2 subj005/beta/subj005_task1_self+tlrc’[2]’
s3 self t3 subj005/beta/subj005_task1_self+tlrc’[3]’
s3 self t4 subj005/beta/subj005_task1_self+tlrc’[4]’
s3 self t5 subj005/beta/subj005_task1_self+tlrc’[5]’
s3 other t0 subj005/beta/subj005_task1_other+tlrc’[0]’
s3 other t1 subj005/beta/subj005_task1_other+tlrc’[1]’
s3 other t2 subj005/beta/subj005_task1_other+tlrc’[2]’

s17 …

I am looking forward to your reply, thank you so much!

Sincerely yours.

Is ‘Time’ for the number of basis functions with TENTzero?

Don’t use GLF test. Instead go with GLT like:

-num_glt … \
-gltLabel 1 contrast_Time0 -gltCode 1 ‘name : 1self - 1other Time : 1t0’
-gltLabel 2 contrast_Time1 -gltCode 2 'name : 1
self - 1other Time : 1t1’

-gltLabel ? self_Time0 -gltCode ? ‘name : 1self Time : 1t0’ \
-gltLabel ? self_Time1 -gltCode ? ‘name : 1self Time : 1t1’ \

Thanks for your reply. Time’ for the number of is basis functions with CSPLINzero following what you said.

However, accoding to your advise, I use glt, there is still an error I met before.

Error:
Failed at GLT No. 1! Make sure that the model or GLT specification syntax is correct.

The new script as follows:

#! /bin/bash

3dMVM -prefix ./group_result/name_result/task1_output.MVM -jobs 2
-bsVars ‘1’
-wsVars ‘nameTime’
-num_glt 8
-gltLabel 1 contrast_Time0 -gltCode 1 'name : 1
self - 1other Time : 1t0’
-gltLabel 2 contrast_Time1 -gltCode 2 ‘name : 1self - 1other Time : 1t1’
-gltLabel 3 contrast_Time2 -gltCode 3 'name : 1
self - 1other Time : 1t2’
-gltLabel 4 contrast_Time3 -gltCode 4 ‘name : 1self - 1other Time : 1t3’
-gltLabel 5 contrast_Time4 -gltCode 5 'name : 1
self - 1other Time : 1t4’
-gltLabel 6 contrast_Time5 -gltCode 6 ‘name : 1self - 1other Time : 1t5’
-gltLabel 7 self_Time0 -gltCode 7 'name : 1
self Time : 1t0’
-gltLabel 8 self_Time1 -gltCode 8 'name : 1
self Time : 1*t1’
-dataTable
Subj name Time InputFile
s1 self t0 subj001/beta/subj001_task1_self+tlrc’[0]’
s1 self t1 subj001/beta/subj001_task1_self+tlrc’[1]’
s1 self t2 subj001/beta/subj001_task1_self+tlrc’[2]’
s1 self t3 subj001/beta/subj001_task1_self+tlrc’[3]’
s1 self t4 subj001/beta/subj001_task1_self+tlrc’[4]’
s1 self t5 subj001/beta/subj001_task1_self+tlrc’[5]’
s1 other t0 subj001/beta/subj001_task1_other+tlrc’[0]’
s1 other t1 subj001/beta/subj001_task1_other+tlrc’[1]’
s1 other t2 subj001/beta/subj001_task1_other+tlrc’[2]’
s1 other t3 subj001/beta/subj001_task1_other+tlrc’[3]’
s1 other t4 subj001/beta/subj001_task1_other+tlrc’[4]’
s1 other t5 subj001/beta/subj001_task1_other+tlrc’[5]’
s2 self t0 subj003/beta/subj003_task1_self+tlrc’[0]’
s2 self t1 subj003/beta/subj003_task1_self+tlrc’[1]’
s2 self t2 subj003/beta/subj003_task1_self+tlrc’[2]’
s2 self t3 subj003/beta/subj003_task1_self+tlrc’[3]’
s2 self t4 subj003/beta/subj003_task1_self+tlrc’[4]’
s2 self t5 subj003/beta/subj003_task1_self+tlrc’[5]’
s2 other t0 subj003/beta/subj003_task1_other+tlrc’[0]’

Thank you again!

Sincerely yours.

For the following 6 lines,

-gltLabel 1 contrast_Time0 -gltCode 1 ‘name : 1self - 1other Time : 1t0’ \
-gltLabel 2 contrast_Time1 -gltCode 2 'name : 1
self - 1other Time : 1t1’ \
-gltLabel 3 contrast_Time2 -gltCode 3 ‘name : 1self - 1other Time : 1t2’ \
-gltLabel 4 contrast_Time3 -gltCode 4 'name : 1
self - 1other Time : 1t3’ \
-gltLabel 5 contrast_Time4 -gltCode 5 ‘name : 1self - 1other Time : 1t4’ \
-gltLabel 6 contrast_Time5 -gltCode 6 'name : 1
self - 1other Time : 1t5’ \

remove the space between ‘-’ and ‘1’.

Thanks for your advise again. This is a detail I never focus before, and I remove the space between ‘-’ and ‘1’.

However, the same error happened again.

Error: Failed at GLT No. 1! Make sure that the model or GLT specification syntax is correct.

Items as follows

    -num_glt 6                    		            \
    -gltLabel 1 contrast_Time0 -gltCode 1 'name : 1*self -1*other Time : 1*t0' \
    -gltLabel 2 contrast_Time1 -gltCode 2 'name : 1*self -1*other Time : 1*t1' \
    -gltLabel 3 contrast_Time2 -gltCode 3 'name : 1*self -1*other Time : 1*t2' \
    -gltLabel 4 contrast_Time3 -gltCode 4 'name : 1*self -1*other Time : 1*t3' \
    -gltLabel 5 contrast_Time4 -gltCode 5 'name : 1*self -1*other Time : 1*t4' \
    -gltLabel 6 contrast_Time5 -gltCode 6 'name : 1*self -1*other Time : 1*t5' \

Furthermore, until now only one script can run successly as follows (there is space between ‘-’ and ‘1’). , but you advice to use glt. So I am a little confused now.

3dMVM -prefix ./group_result/name_result/task1_output.MVM -jobs 2
-bsVars ‘1’
-wsVars ‘nameTime’
-num_glf 1
-glfLabel 1 contrast_Time -glfCode 1 'name : 1
self - 1other Time : 1t0 & 1t1 & 1t2 & 1t3 & 1t4 & 1*t5’ \
-dataTable
Subj name Time InputFile
s1 self t0 subj001/beta/subj001_task1_self+tlrc’[0]’
s1 self t1 subj001/beta/subj001_task1_self+tlrc’[1]’
s1 self t2 subj001/beta/subj001_task1_self+tlrc’[2]’
s1 self t3 subj001/beta/subj001_task1_self+tlrc’[3]’

The GLF test under 3dMVM is not valid for a within-subject factor even though the program does not complain.

Is ‘name’ a within- or between-subject factor?