From the first error message it sounds like you're not even passing in a valid "netmat" matrix. What do you get from: size(netmat1) Steve On 20 Jun 2013, at 01:23, "Jacobs H (NP)" <[log in to unmask]> wrote: > Dear Steven, > > Thanks for clarifying this. > But even when setting the working directory and seeing FSLnets doing randomise, I end up with this error message: > > Error in ==> nets_glm at 3 > XXX=size(netmat,2); > > ??? Output argument "p_uncorrected" (and maybe others) not assigned during call to > "/users/hjacobs/Documents/MATLAB/FSLNets/nets_glm.m>nets_glm". > > Error in ==> nets_RIMCAD at 64 > [p_uncorrected,p_corrected]=nets_glm(netmat1,'design.mat','design.con',0); % returns > matrices of 1-p > > How should I change this in the script? I says to do something with the fourth argument? > > %%% cross-subject GLM, with inference in randomise (assuming you already have the GLM design.mat and design.con files). > %%% arg4 determines whether to view the corrected-p-values, with non-significant entries removed above the diagonal. > [p_uncorrected,p_corrected]=nets_glm(netmat1,'design.mat','design.con',1); % returns matrices of 1-p > %%% OR - GLM, but with pre-masking that tests only the connections that are strong on average across all subjects. > %%% change the "8" to a different tstat threshold to make this sparser or less sparse. > %netmat=netmat3; [grotH,grotP,grotCI,grotSTATS]=ttest(netmat); netmat(:,abs(grotSTATS.tstat)<8)=0; > %[p_uncorrected,p_corrected]=nets_glm(netmat,'design.mat','design.con',1); > > Your help is really appreciated! > > Best > Heidi > > > > > ________________________________________ > Van: FSL - FMRIB's Software Library [[log in to unmask]] namens Stephen Smith [[log in to unmask]] > Verzonden: donderdag 20 juni 2013 2:25 > Aan: [log in to unmask] > Onderwerp: Re: [FSL] Desperate: I do not understand the error > > Hi > > On 19 Jun 2013, at 15:03, Jacobs H (NP) <[log in to unmask]<mailto:[log in to unmask]>> wrote: > > Hi folks, > > I have been trying FSLNETS for over 2 weeks and was able to conquer some of the error messages. > But the last one is really mind-boggling, I keep starring at the screen and I have no idea what to do. > I really hope someone is able to help me on this: > > This is the first error message: > > Warning: ward's linkage specified with non-Euclidean dissimilarity matrix. > In linkage at 125 > In nets_hierarchy at 26 > In nets_RIMCAD at 59 > > that's normal > > > Is this a bad thing? > > Then it continues with this: > > randomise options: -i /private/tmp/tp1197c194_3cc4_43d4_9021_cf281e7ba4bc -o /private/tmp/tp1197c194_3cc4_43d4_9021_cf281e7ba4bc -d design.mat -t design.con -x -n 5000 > Loading Data: ERROR: Program failed > > An exception has been thrown > Unable to open design.mat > > this means that you have not created valid design files in the matlab working directory. > > Cheers, Steve. > > > > > Exiting > Error in ==> nets_glm at 3 > XXX=size(netmat,2); > > ??? Output argument "p_uncorrected" (and maybe others) not assigned during call to > "/users/hjacobs/Documents/MATLAB/FSLNets/nets_glm.m>nets_glm". > > Error in ==> nets_RIMCAD at 64 > [p_uncorrected,p_corrected]=nets_glm(netmat1,'design.mat','design.con',0); % returns > matrices of 1-p > > I have no clue. Apparently it cannot read design.mat. In which folder should this be?? This is in my dual regression folder, is that ok? > > I have looked at my edited script and this is what it says: > %%% cross-subject GLM, with inference in randomise (assuming you already have the GLM design.mat and design.con files). > %%% arg4 determines whether to view the corrected-p-values, with non-significant entries removed above the diagonal. > [p_uncorrected,p_corrected]=nets_glm(netmat1,'design.mat','design.con',1); % returns matrices of 1-p > %%% OR - GLM, but with pre-masking that tests only the connections that are strong on average across all subjects. > %%% change the "8" to a different tstat threshold to make this sparser or less sparse. > %netmat=netmat3; [grotH,grotP,grotCI,grotSTATS]=ttest(netmat); netmat(:,abs(grotSTATS.tstat)<8)=0; > %[p_uncorrected,p_corrected]=nets_glm(netmat,'design.mat','design.con',1); > > What do I need to do?? How can I change argument4? How can I assign the p_uncorrected? > Am I correct that this is the part where I can examine group-differences in correlations between networks? > > Look forward to some help with this! > > Best > Heidi > > > > --------------------------------------------------------------------------- > Stephen M. Smith, Professor of Biomedical Engineering > Associate Director, Oxford University FMRIB Centre > > FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK > +44 (0) 1865 222726 (fax 222717) 2176 > [log in to unmask]<mailto:[log in to unmask]> http://www.fmrib.ox.ac.uk/~steve > --------------------------------------------------------------------------- > > Stop the cultural destruction of Tibet<http://smithinks.net> > --------------------------------------------------------------------------- Stephen M. Smith, Professor of Biomedical Engineering Associate Director, Oxford University FMRIB Centre FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK +44 (0) 1865 222726 (fax 222717) 2176 [log in to unmask] http://www.fmrib.ox.ac.uk/~steve --------------------------------------------------------------------------- Stop the cultural destruction of Tibet