open-discussion > mancova error instance
Showing 1-5 of 5 posts
Results per page:
Dec 20, 2016  04:12 PM | Hugh Wang
mancova error instance
Dear Spharm experts:

I ran a thalamus shape analysis with Slicer 4.5 and SPHARM-PDM extension. I did not find shapeAnalysisMANCOVA_wizard in Slicer extension, so I borrowed the one from 1.12 version. 

Then I created a csv file to do a simple comparison between patient group and control group, the command is as following (csv file is attached):
shapeAnalysisMANCOVA L_thal_Patient-Control_mancova.csv --hotelling --testColumn 0 --columnGroupTypes 0 --numGroupTypes 1 --infileColumn 1 --numPerms 10000

but in the end the program complained about "std::out_of_range", the outputs were like the following:
input file specified: L_thal_Patient-Control_mancova.csv
filename: L_thal_Patient-Control_mancova.csv numIndependent: 0
Num Subjects: 119
data in group_type 0 has been relabeled: 0 --> group A = -1 ; 1 --> group B = 1
#(A)= 69; #(B)= 50
/mnt/DATAPART1/mTBI_shape/spharm_crosssectional/L_thal_mTemplate/Mesh/SPHARM/L-HT102_nu_all_none_firstseg_mni_pp_surf_tMeanSPHARM_procalign.vtk -1 6.9013e-310
reading Mesh /mnt/DATAPART1/mTBI_shape/spharm_crosssectional/L_thal_mTemplate/Mesh/SPHARM/L-TBN025_nu_all_none_firstseg_mni_pp_surf_tMeanSPHARM_procalign.vtk - .vtk
Using Hotelling statistics.
Now running nonparametric tests:
Performing MANCOVA permutation testing.
Using 10000 permutations.
Completed MANCOVA permutation testing.
fdr thresh (MANCOVA) is = 0
Runtime was 3 minute(s) and 12 second(s).
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::erase
Aborted (core dumped)

There was no error when running shape analysis module in Slicer and surface looked good in the quality check. 
Thank you very much!

Jan 3, 2017  01:01 PM | Martin Styner
RE: mancova error instance
mmm, the command line looks good. 
It also recognises the vtk meshes correctly. Not sure what the problem is.

Can you try adding another column with all 1.0 entries (as the third column, index 2) as the scaling info and then add --scaleColumn 2?

Jan 3, 2017  03:01 PM | Hugh Wang
RE: mancova error instance
Thank you Martin. I tried with scaling option, and it gave the same error. Although the program ended with errors, I still have stats result text files. The raw p-value file looks reasonable (see attached pic). but the fdr corrected p values are all ones. My guess is that the problem could be something during the fdr correction, especially the program outputted "fdr thresh (MANCOVA) is = 0", which I think is abnormal. 

Jan 4, 2017  07:01 AM | Martin Styner
RE: mancova error instance
Hi Hugh
a FDR threshold of 0 is indeed rare, though should not be impossible, i.e. it could be a bug or a real thing. The main thing is that none of the p-values pass FDR correction (which is not surprising giving the screenshot you sent where the smallest raw p-values over the full surface was 0.0019 (most probably closer to 0.01)
Jan 4, 2017  12:01 PM | Hugh Wang
RE: mancova error instance
Thanks Martin. Although the "std::out_of_range" error remains a mystery, you were right that it was possible no vertex survived after correction. I processed the same data with FSL FIRST and there were some areas showed significant difference after correction, so I wanted to verify with SPHARM. I'll look into the data again. Thank you very much for your help!