Muchas gracias tío, eres un crack!On 4 December 2013 19:02, jorge luis <jbernal0019@yahoo.es> wrote:
I see, the problem seems to be that the input maskvtx is not a binary mask. It's a typical Freesurfer's surface label, i.e a vector with the locations (1-based vertices) that are going to be included in the analysis. If you want to include all voxels in the analysis then just set it to the empty vector [] :
stats = lme_mass_fit_vw(X,[1 2],Y,ni,[]);Otherwise enter a vector with the indices of the locations that you want to include in the analysis.
Best-Jorge
El Miércoles 4 de diciembre de 2013 13:43, Seán Froudist Walsh <froudiss@tcd.ie> escribió:
Many thanks,My data matrix Y is 357x2122945 (number of scans x number of voxels) and the mask is 1x2122945. I may have misinterpreted how the mask should be input though. In the help for lme_mass_fit_vw it says that the mask should be 1-based. I thought this might have meant making a binary mask, with ones in the voxels to be included, and zeros elsewhere. lme_mass_fit_vw didn't like the format of the mask so I googled the error, and Google seemed to suggest I should be inputting a logical-type file. So I ran logical_mask = logical(Mask); before running lme_mass_fit_vw. There are 342934 non-zero elements in the mask. This is the amount of points that lme_mass_fit_vw ran for.Hi Jorge,Thanks a lot for your reply. I will try out everything you have said. Yes, you're right. I've finally got around to trying out your toolbox on my voxel-based data (see http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg31564.html ).
SeánOn 4 December 2013 18:22, jorge luis <jbernal0019@yahoo.es> wrote:
Hi Sean
I'm not sure what is going on. Can you please run the simpler univariate analysis at some random locations? Eg. At location 1000 of your mask (assuming you have to random effects for intercept and time):
[stats, st] = lme_fit_FS(X, [1 2], Y(:, mask(1000)), ni);
If your mask is empty then all vertices/voxels are considered in the analysis. So you should instead run
[stats, st] = lme_fit_FS(X, [1 2], Y(:, 1000), ni);
This can help since you will be able to see the likelihood values through iterations until convergence. Also check the value of st. If the algorithm converge then st must be 1 otherwise it must be 0. Also look out for any prompted error. You will be able to see whether there is any problem with your design matrix.
Given that you have a location as large as 337812 it seems that you are not applying lme to a standard surface-based analysis. Is it a VBM analysis? What is the size of your mask and data matrix Y?
Best-Jorge
El Miércoles 4 de diciembre de 2013 5:04, Seán Froudist Walsh <froudiss@tcd.ie> escribió:
_______________________________________________Any help is much appreciated.2) If it really is a problem, what would you recommend I do to remedy it? Set the convergence epsilon to 10^5?1) Should I believe this message, even though it seems to contradict what has been printed to the screen while lme_mass_fit_vw was running?I have two questions please.There was the very occasional message saying the algorithm did not converge at some location, a message I saw only 2 or three times (although I wasn't looking at the matlab window for 6 hours straight, thankfully).Dear Jorge and FreeSurfers,etc....
I have just been running lme_mass_fit_vw for 6 hours, and I have seen many thousands of messages like the following:
"Location 337813: Convergence at iteration 4. Initial and final likelihoods: 607.8828, 611.1052.
Location 337812: Convergence at iteration 4. Initial and final likelihoods: 603.0934, 604.4513."
I thought, so far, so good.
I came in to work this morning however, and found that it had finished, with the following ugly message waiting for me:
"Algorithm did not converge at 99.9997 percent of the total number of locations.
Total elapsed time is 357.4368 minutes."
Best wishes,
Seán
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail._______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.