3dLME script error data.frame: undefined columns selected

Hi,

I am trying to run a 3dLME script (simple ANOVA) with my variable for comparison being ‘latent class.’ I keep getting the following error:

Error in [.data.frame(lop$dataStr, , jj) : undefined columns selected
Calls: process.LME.opts → [ → [.data.frame
Execution halted

My script is as follows:

3dLME -prefix test -jobs 1
-model “latent_class+bl_completed_timestamp+Sex_best+Phil_IMP_PDS+IMP_handedness+Site_1+Site_2+site_3+site_4+site_5+site_6+site_7+IMP_IQ_PR+IMP_IQ_VC+IMP_Phil_totalGMV.14”
-qVars “bl_completed_timestamp,Phil_IMP_PDS,IMP_IQ_PR,IMP_IQ_VC,IMP_Phil_totalGMV.14”
-ranEff ’~1’
-SS_type 3
-dataTable
Subj bl_completed_timestamp Sex_best Phil_IMP_PDS IMP_handedness Site_1 Site_2 site_3 site_4 site_5 site_6 site_7 IMP_IQ_PR IMP_IQ_VC IMP_Phil_totalGMV.14 latent_class InputFile
000000022453 5351 0 2.2 1 0 0 0 0 0 0 0 114 116 769991 1 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000022453.nii
000000075717 5350 0 3 1 0 1 0 0 0 0 0 100 109 791158 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000075717.nii
000000106601 5060 0 2.4 0 0 0 0 0 0 0 1 125 105 772073 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000106601.nii
000000106871 5608 1 2.8 1 0 0 0 0 0 0 0 110 99 729178 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000106871.nii
000000112288 5258 0 2.4 1 0 0 0 0 0 0 1 112 99 720459 4 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000112288.nii
000000240546 5285 0 2.8 1 0 0 0 1 0 0 0 131 140 808224 1 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000240546.nii
000000297685 5275 1 3.8 1 0 1 0 0 0 0 0 104 87 697298 1 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000297685.nii
000000308867 5172 0 2.8 1 0 1 0 0 0 0 0 92 105 743821 2 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000308867.nii
000000397377 5299 1 2.6 1 0 0 0 1 0 0 0 104 115 580802 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000397377.nii
000000458976 5194 1 3 0 0 0 0 0 0 0 0 116 116 706129 4 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000458976.nii
000000459848 5255 1 2.2 1 0 0 0 0 0 0 1 119 93 717422 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000459848.nii
000000469693 5249 1 3.2 1 0 0 0 0 1 0 0 112 117 571626 4 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000469693.nii
000000540905 5251 1 2 1 0 0 0 1 0 0 0 119 142 684633 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000540905.nii
000000602062 5166 0 3 1 0 0 0 0 0 0 1 92 109 791640 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000602062.nii
000000613223 5345 0 2.6 1 0 0 0 0 0 0 0 125 109 852181 2 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000613223.nii
000000642263 5503 1 2.6 1 0 0 0 0 0 1 0 104 117 718236 2 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000642263.nii
000000663084 5450 1 2.6 0 0 0 1 0 0 0 0 125 124 661362 4 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000663084.nii
000000724314 5128 0 2.6 1 0 0 0 0 0 0 1 117 124 744396 3 /Volumes/Backup_2/Test_Folder/s888mwc1mprage000000724314.nii

Any ideas on how to fix this issue?
~BFair

Is “latent_class” a subject-grouping (between-subjects) variable? If so, it would be easier to just use 3dttest++. I hope that you have more subjects than what’s copied in the script here.

Hi Gang,

Yes, latent_class is a subject-grouping variable. I do have more subjects…but I wanted to make sure the script would run with fewer subjects before adding the rest. I would like to refrain from using multiple independent T-tests in order to avoid Type I errors. Any idea on how to fix this error to use 3dLME?

Best,
~BFair

What are those variables with values of 0 and 1? Are they actually categorical variables (factors)? If so, it’s better to explicitly treat them as factors instead of quantitative variables. In addition, center those real quantitative variables properly:

https://afni.nimh.nih.gov/sscc/gangc/centering.html

Since there are no within-subject variables in your case, 3dLME is not an ideal program for the situation. Instead use 3dMVM.

Hi Gang,

Thank you for your response. The variables listed as 0’s and 1’s are categorical (they dictate the site of data collection), thus I did not list them under qVars. Do I need to list them as a factor somehow?

Also, I am only interested in the covariate effect of my quantitative variables, so I believe I do not need to center them.

I thought my quantitative variables were also my within-subject variables. The only variable I am trying to compare between groups is latent_class. The rest of my variables are covariates.

Best,
~Brittany