We are trying to run 3dLME but are stopped by a model test error. We suspect "Inappropriate model specification" but do not see why.
Any insights or obvious issues?
Thanks!
3dLME -overwrite -prefix ../ncanda_scripts/ncanda_3dlme_output/3dlme_output_extxagexcor_continuous.nii.gz \
-mask gm_50mask+tlrc \
-model 'Ext_t*ageatvisit*correct+reward+meanmotion' \
-qVars "Ext_t,ageatvisit,meanmotion" \
-ranEff '~1' \
-jobs 8 \
-SS_type 3 \
-dataTable @datatable_3dlme_resp2018419.txt
where dataTable looks like
Subj ageat… visit Ext_t Int_t Risk_… Ext_… Int_… meanm… corr… rewa… InputF…
<fctr> <dbl> <int> <dbl> <dbl> <fctr> <fct> <fct> <dbl> <fct> <fct> <fctr>
1 A002 0.110 2 3.87 3.93 no no no 0.182 corr… neut… ../A00…
2 A002 0.110 2 3.87 3.93 no no no 0.182 corr… rewa… ../A00…
3 A002 0.110 2 3.87 3.93 no no no 0.182 erro… neut… ../A00…
4 A002 0.110 2 3.87 3.93 no no no 0.182 erro… rewa… ../A00…
5 A004 0.404 2 3.89 3.71 yes no no 0.0938 corr… neut… ../A00…
6 A004 0.404 2 3.89 3.71 yes no no 0.0938 corr… rewa… ../A00…
Ultimately we have 194 InputFiles repeated 4 times for each cat. vars reward and correct
read.table("datatable_3dlme_resp2018419.txt",header=T) %>% group_by(reward,correct) %>% summarise(n=length(InputFile)) %>% filter(n!=1)
reward correct n
<fctr> <fctr> <int>
1 neutral correct 194
2 neutral error_correct 194
3 reward correct 194
4 reward error_correct 194
3dLME's model test fails:
***** End of data structure information *****
++++++++++++++++++++++++++++++++++++++++++++++++++++
Reading input files now...
Reading input files: Done!
If the program hangs here for more than, for example, half an hour,
kill the process because the model specification or the GLT coding
is likely inappropriate.
~~~~~~~~~~~~~~~~~~~ Model test failed ~~~~~~~~~~~~~~~~~~~
Possible reasons:
0) Make sure that R packages nlme and phia have been installed. See the 3dLME
help documentation for more details.
1) Inappropriate model specification with options -model, or -qVars.
2) In correct specifications in general linear test coding with -gltCode.
3) Mistakes in data table. Check the data structure shown above, and verify
whether there are any inconsistencies.
4) Inconsistent variable names which are case sensitive. For example, factor
named Group in model specification and then listed as group in the table hader
would cause grief for 3dLME.
** Error:
Quitting due to model test failure...