When I try to calculate the beta weights using fsl_glm I get the error message fdtr domain error for the subjects who only have 2 timepoints. I suppose that this is because the degrees of freedom becomes zero, as I have 2 measurements and 2 regressors. But I don't need the t-value, I only need the betas and those should still be possible to calculate. I tried setting --dof=10 but still the same error. cheers, Anders ________________________________________ Från: FSL - FMRIB's Software Library [[log in to unmask]] för Anderson M. Winkler [[log in to unmask]] Skickat: den 9 april 2013 20:05 Till: [log in to unmask] Ämne: [FSL] Test of linear effect with randomise, for repeated measurements Hi Anders, Yes, that would be it. Only 5 subjects is a problem, and I don't see an easy solution other than recruiting more people. If you need some results before deciding if it worth the effort and cost, maybe you could compute the p-values parametrically and correct with FDR (RFT will likely fail with such low df). This probably wouldn't be acceptable for publication, but maybe it could give you some slack guidance if you see dramatic effects. All the best, Anderson Am Dienstag, 9. April 2013 schrieb Anders Eklund : Thanks, so in short calculate beta1 and beta2 for each subject and voxel, and then permute volumes of beta2 with randomise? If I have 5 subjects, there will however only be 32 possible permutations. cheers, Anders ________________________________________ Från: FSL - FMRIB's Software Library [[log in to unmask]] för Anderson M. Winkler [[log in to unmask]] Skickat: den 9 april 2013 13:32 Till: [log in to unmask] Ämne: Re: [FSL] Test of linear effect with randomise, for repeated measurements Hi Anders, I see two issues with this design: - First, and easy to solve, is that you need to have an intercept per subject. So replace EV1 with 5 EVs. - Second, this is harder: the permutations can only be done under the assumption that the covariance between the observations are all identical within subject, which I think is a bit unlikely. Having this assumption not met precludes using randomise for your design. Perhaps you could eschew this by computing the slope for each subject (use fslmaths or, e.g., Octave/Matlab), then make a 4D file containing one volume per subject (with the slopes), and compute a 1-sample t-test in randomise -- it will then do a sign-flipping test, which is indeed appropriate given that the positive and negative slopes are equally likely under the null. All the best, Anderson 2013/4/8 Anders Eklund <[log in to unmask]<mailto:[log in to unmask]>> Dear FSL experts, I would like to test longitudinal data for a linear (or possibly quadratic) effect over time. Some subjects have been scanned two times, some three times and some four times. A first level analysis has been performed with a customized bash script, and the result for each subject and timepoint is now taken to a second level analysis. I would like to investigate if any parts of the brain are linearly affected as function of the time after injury (rather than an ordinary t-test between different timepoints). How do I setup this testing with randomise? Let's say I have data from 5 subjects. Subjects 1 and 2 were scanned four times, subject 3 and 4 three times and subject 5 two times. I use two regressors in the design matrix, one for the mean and one for the number of days between the injury and the scan. Each subject belongs to one group. Group EV1 EV2 1 1 10 1 1 25 1 1 55 1 1 85 2 1 8 2 1 29 2 1 58 2 1 85 3 1 2 3 1 34 3 1 66 4 1 5 4 1 45 4 1 80 5 1 6 5 1 60 The design matrix is simply the two regressors, and design.grp is the group column. I want to test if the linear effect is significant, so the t-contrast is 0 1. The input to randomise is one 4D file where the order of the volumes matches the group column. Can anyone verify if this is correct? cheers, Anders