help > error running permutation tetsting
Showing 1-11 of 11 posts
Display:
Results per page:
May 15, 2017  12:05 AM | Hua Yu
error running permutation tetsting
Dear experts,

Recently, I was using the GLM to test the relationship of "assortativity" and "clustering coefficient" with my symptom scores. Every time, when I load my design matrix, which was 2 columns and 67 rows ( the first column represents the subject, while the value is 1; the second column is PANSS score, while it was different according to the subjects),  and hit the start button, the same error "The design matrix has more predictor variables than observations." would show up on Matlab. But when I ran the correlation analysis with "degree" and "density" properties, there were no errors. Can you kindly help me solve this problem? Looking forward to your reply.

Best regards,

Hua
May 16, 2017  04:05 PM | Jeffrey Spielberg
RE: error running permutation tetsting
How many participants do you have?  Can you upload a screenshot of the GUI before you hit start?
May 16, 2017  04:05 PM | Hua Yu
RE: error running permutation tetsting
Hi Jeffery,

I have 67 subjects, and the shortcut GUI is in the uploaded file.

Thanks,

Hua
Attachment: short_cut.png
May 16, 2017  10:05 PM | Jeffrey Spielberg
RE: error running permutation tetsting
What are the dimensions of participants_number and participants_size (i.e., size(participants_number))?  Also, is participants_number just a column of ones?
May 16, 2017  10:05 PM | Hua Yu
RE: error running permutation tetsting
Hi Jeffrey,

I imported the same design matrix as which I used in NBS, so the participants' number is just a column of ones. The attached file is a text file of my design matrix. I have 67 rows in total, each represents a single subject. Seems I didn't do the right thing?


Thanks for your kind reply,

Hua
Attachment: design_matrix.png
May 16, 2017  10:05 PM | Jeffrey Spielberg
RE: error running permutation tetsting
Nope, the column of ones is fine (although not necessary for you to specify, as the toolbox will automatically create one if not present already).

For some reason, the toolbox thinks that the design matrix has more columns than rows, which is why I was wondering about the size of the two variables.

After you import the design matrix, are the dimensions of the participants_scores variable 67x1?  I'm wondering if the importing process flips the dimensions of the variables.
May 16, 2017  10:05 PM | Hua Yu
RE: error running permutation tetsting
Yes, exactly, the imported variables scores are in a 67x1 mat file in the workspace.
May 16, 2017  10:05 PM | Jeffrey Spielberg
RE: error running permutation tetsting
Ok, try running again without including the participants_number variable.  

If that doesn't work, please send the entire error that you receive in matlab.
May 17, 2017  02:05 AM | Hua Yu
RE: error running permutation tetsting
Hi Jeffery,


I only included the symptom variable, unfortunately, there was still the same error showing in Matlab. The following is Matlab error message:

Running permutation analyses for contrast/F-test 1 ...
Error using regstats (line 124)
The design matrix has more predictor variables than observations.

Error in GTG_runpermanalyses_GUI>GTG_GLM (line 4261)
temp = regstats(DV,full_desmat,eye(size(full_desmat,2)),{'tstat'});
Error in GTG_runpermanalyses_GUI>Start_pushbutton_Callback (line 1979)
eval(['[out.thrAUC.',curr_short_name,'_pos.beta(con,:),out.thrAUC.',curr_short_name,'_pos.test_stat(con,:),out.thrAUC.',curr_short_name,'_pos.crit_val(con,:),out.thrAUC.',curr_short_name,'_pos.p_1tail(con,:),out.thrAUC.',curr_short_name,'_pos.p_2tail(con,:),out.thrAUC.',curr_short_name,'_pos.hadNaN(con,:),out.thrAUC.',curr_short_name,'_pos.hadimag(con,:),out.thrAUC.',curr_short_name,'_pos.hadInf(con,:),permdis,out.thrAUC.',curr_short_name,'_pos.nonperm_p(con,:)]
=
GTG_GLM(out.AUC_thrmat_graph_meas.',curr_short_name,'_pos,curr_full_desmat,currcovars_desmat,out.Contrast_or_F,perms,out.HLA_reg_type,use_parfor,within_perms,out.alpha,out.MC_corr);']);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in GTG_runpermanalyses_GUI (line 98)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)GTG_runpermanalyses_GUI('Start_pushbutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback

Thank you very much for kind help,
Best!

Hua
May 17, 2017  11:05 AM | Jeffrey Spielberg
RE: error running permutation tetsting
Ok, copy these lines into GTG_runpermanalyses_GUI.m right before the line throwing the error (i.e., line 4261), then save, rerun, and send me the output:

size(DV)
size(full_desmat)
May 17, 2017  12:05 PM | Hua Yu
RE: error running permutation tetsting
Hi Jeffery,

I already past the code in the gui mat file. It seems work a little, but still errors showing in Matlab. The following is my running result.

>> GTG
Running permutation analyses for contrast/F-test 1 ...

ans =
67 1
ans =
67 2
Error using regstats (line 124)
The design matrix has more predictor variables than observations.
Error in GTG_runpermanalyses_GUI>GTG_GLM (line 4263)
temp = regstats(DV,full_desmat,eye(size(full_desmat,2)),{'tstat'});
Error in GTG_runpermanalyses_GUI>Start_pushbutton_Callback (line 1979)
eval(['[out.thrAUC.',curr_short_name,'_pos.beta(con,:),out.thrAUC.',curr_short_name,'_pos.test_stat(con,:),out.thrAUC.',curr_short_name,'_pos.crit_val(con,:),out.thrAUC.',curr_short_name,'_pos.p_1tail(con,:),out.thrAUC.',curr_short_name,'_pos.p_2tail(con,:),out.thrAUC.',curr_short_name,'_pos.hadNaN(con,:),out.thrAUC.',curr_short_name,'_pos.hadimag(con,:),out.thrAUC.',curr_short_name,'_pos.hadInf(con,:),permdis,out.thrAUC.',curr_short_name,'_pos.nonperm_p(con,:)]
=
GTG_GLM(out.AUC_thrmat_graph_meas.',curr_short_name,'_pos,curr_full_desmat,currcovars_desmat,out.Contrast_or_F,perms,out.HLA_reg_type,use_parfor,within_perms,out.alpha,out.MC_corr);']);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in GTG_runpermanalyses_GUI (line 98)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)GTG_runpermanalyses_GUI('Start_pushbutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback

Best,

Hua