Fatal Error with 3dtest++

Hello,

I’m running 3dttest++ with one set of subjects and a covariates file. I receive a fatal error: Too many covariates (1) compared to number of datasets in each -set. Can you give me some ideas how to troubleshoot this?
I tried using the gen_group_command.py and ran the command that was generated by this routine and got the exact same error.
I’m testing this with only two subjects and the covariates file is extremely simple text file (I also tried a csv), so I’m having a hard time figuring this out.

Thanks so much!

Hi-

Can you please post your AFNI version number (‘afni -ver’), and the 3dttest++ command that you are running?

-pt

Hi,

Afni version 18.3.03

3dttest++ -prefix zscores -set A sub1+tlrc sub2+trlc -covariates covariates_file.txt -toz -DAFNI_DEBUG_TABLE=YES

The inside of my covariates_file.txt looks like this (and the spacing was created with tabs):

subjID math
sub1 10
sub2 16

Hi-

Mathematically, you can’t solve the problem that you have tried to set up there, having only 2 subjects with a covariate. At a minimum, you would need 3 subjects when including a covariate.

In general, I think you need (many) more subjects to be able to run that kind of test. You can’t really generate a statistical testing scenario with only 2 or 3 subjects.

Also, there appears to be a space between “set” and “A” in “-setA”-- that should be creating an error for you, too.

–pt

Hello,

Sorry for my sloppy syntax in my earlier message, i DID have -setA specified with no space in my actual script (and when testing on command line).
I thought of the same thing about the mathematical problem, and I added more subjects, but got the exact same error, which made me think it wasn’t a mathematical problem but some kind of syntax problem. If you have any other trouble-shooting ideas, please let me know!

Best,
Mel

Hi Mel,

To avoid guessing, could we see the current command, along with the complete text output to the screen?

Thanks,

  • rick

Hello,

I’ve attached a screenshot of the error I’m getting.
You can see the command I ran in the screenshot, but I’ll type it out also:

3dttest++ -prefix zscores -setA S055_lamy+tlrc S056_lamy+tlrc -covariates lamy_math_continuous_GSR.txt -toz -DAFNI_DEBUG_TABLE=YES

Thanks for your help!

Hi-

In general, it would be preferred to copy+paste the text directly into the window, I think-- that is easier to read and search through than an image of text/terminals.

The text can also be wrapped in the “code formatting” within the post, if you see a button just above the message-entering part of the Message Board post area-- between the “quotes” graphic and the “left”/“center”/“right” formatting buttons is a white square with little lines-- if you hover over that, that says "formatted code. If you highlight text in your post and click that button, you will see a little “code” in square brackets at the start/end of that code block.

And then your code will be readably formatted. For example, non-formatted few lines of code:

run afni_proc.py to create a single subject processing script

afni_proc.py -subj_id $subj
-script proc.$subj -scr_overwrite
-blocks tshift align tlrc volreg blur mask scale regress
-copy_anat $top_dir/FT_anat+orig
-tcat_remove_first_trs 2
-dsets
$top_dir/FT_epi_r1+orig.HEAD
$top_dir/FT_epi_r2+orig.HEAD
$top_dir/FT_epi_r3+orig.HEAD
-volreg_align_to MIN_OUTLIER
-volreg_align_e2a \

… and the same lines wrapped in formatting (notice the code-literal spacing and styling):


# run afni_proc.py to create a single subject processing script
afni_proc.py -subj_id $subj                                      \
        -script proc.$subj -scr_overwrite                        \
        -blocks tshift align tlrc volreg blur mask scale regress \
        -copy_anat $top_dir/FT_anat+orig                         \
        -tcat_remove_first_trs 2                                 \
        -dsets                                                   \
            $top_dir/FT_epi_r1+orig.HEAD                         \
            $top_dir/FT_epi_r2+orig.HEAD                         \
            $top_dir/FT_epi_r3+orig.HEAD                         \
        -volreg_align_to MIN_OUTLIER                             \
        -volreg_align_e2a                                        \

It may seem like a small difference, but readability+searchability really help people respond to questions/comments much more easily.

Thanks,
pt

Your command has 2 input datasets, and it is asking for output of a mean, a covariate beta, and a variance statistic. It is not solvable with only 2 volumes of input.

Is this just a test run, do you have more subjects to add?

  • rick

Hello,

  1. Yes, I ran this on TWO subjects. I also tried it on 10 subjects and got the same error–as I described earlier in the thread–so I made it simpler by only running it on 2 subjects. Bc I got the same error with 10 subjects, I don’t think it’s a problem with the limited number of subjects.

Here’s the output. The only reason I attached a screenshot earlier was because I do not know how to copy/paste from a terminal with a remote connection to anything else unless I have a middle button of a mouse (and that was not available to me until today)–if you have any other suggestions on how to do this, please share, as it has mystified me for several years. Here is the output when I run the test on 2 subjects and get a failure:

++ 3dttest++: AFNI version=AFNI_18.3.03 (Oct 19 2018) [64-bit]
++ Authored by: Zhark++
++ option -setA :: processing as SHORT form (all values are datasets)
++ Covariates file: 2 columns, each with 2 rows

  • Covariate column labels: subjID;math
  • Found 1 numeric column: math
    ** FATAL ERROR: 3dttest++: don’t recognize option ‘DAFNI_DEBUG_TABLE=YES’ (argv[9])
    ** Program compile date = Oct 19 2018
    mpincus@hermes:~/data/Analysis_Math_rsfMRI/TEST_Math_Ability_w_IQcovariate_Jan_2019_GSR> 3dttest++ -prefix zscores -setA S055_lamy+tlrc S056_lamy+tlrc -covariates lamy_math_continuous_GSR.txt -toz -DAFNI_DEBUG_TABLE=YES
    ++ 3dttest++: AFNI version=AFNI_18.3.03 (Oct 19 2018) [64-bit]
    ++ Authored by: Zhark++
    ++ option -setA :: processing as SHORT form (all values are datasets)
    ++ Mixed Table: processing file lamy_math_continuous_GSR.txt
  • first line = ‘subjID math’
  • found 2 labels in first line
  • processing row #0 = ‘S055_lamy 25’
  • deciding format of 1 columns
  • – col#1 is numeric
  • processing row #1 = ‘S056_lamy 9’
  • checking for duplicate labels
  • Table element follows::
    <AFNI_table
    ni_type=“String,float”
    ni_dimen=“2”
    Labels=“subjID;math” >
    “S055_lamy” 25
    “S056_lamy” 9
    </AFNI_table>

++ Covariates file: 2 columns, each with 2 rows

  • Covariate column labels: subjID;math
  • Found 1 numeric column: math
    ** FATAL ERROR: Too many covariates (1) compared to number of datasets in each -set
    ** Program compile date = Oct 19 2018

This error is specifically because the number of volumes needs to exceed the number of covariates by at least 3. So if there is an error with 10 subjects, it should be different. Go ahead and post the command and error for the 10 subject case.

Thanks,

  • rick