External Email - Use Caution On Tue, Jan 21, 2020 at 10:40 AM Greve, Douglas N.,Ph.D. < dgr...@mgh.harvard.edu> wrote:
> > > On 1/17/2020 10:39 AM, Graduate Imaging wrote: > > External Email - Use Caution > >> Hello, >> >> I recently ran a vertex wise analysis on two different projects the first >> had three groups with three co-variates that looked at if group membership >> was associated with brain volume. The second project had two groups with >> three co-variates looking at psychiatric x BMI interaction effect on brain >> volume. I'm interested in running ROI analyses in matlab to ensure the same >> matrices were used. >> >> To run the ROI analyses I'm going to important the design matrix from the >> vertex wise analysis and use the fast_glmfit and fast_fratio commands as >> shown below: >> X = load('Xg.dat'); >> C = load('C.dat'); >> y = load('ROI.dat'); text file containing participant ROI values from the >> DKT atlas. >> [beta rvar] = fast_glmfit(y,X); >> [F pvalues] = fast_fratio(beta,X,rvar,C >> >> My first question is the beta values that are calculated from fast_glmfit >> are unstandardized is there anyway way to have it compute standardized >> values? >> >> I think this is how you would compute that >> betastddev = sqrt(rvar*diag(inv(X'*X))); >> betastandard = beta./betastddev; >> > When I try running this in Matlab I get the Error using *** incorrect > dimensions for matrix multiplication message. > > That means that the number of items in y (ie, number of subjects in > ROI.dat) is different than the number of rows in X (number of subjects in > the fsgd). What are the sizes of y and X? > That's what I suspected as well however, X = 102x12 and Y= 102x5. I ran [betastddev = sqrt(rvar*diag(inv(X'*X))); betastandard = beta./betastddev] after running successfully running [[beta rvar] = fast_glmfit(Y,X); [F pvalues] = fast_fratio(beta,X,rvar,C)] so its odd that the the dimensions wouldn't be matching. Also when using fast_glmfit and fast_fratio via Matlab for ROI analyses what are the appropriate papers to cite? In the Matlab files in fsfast there is reference to Worsley, K.J. and Friston, K.J. Analysis of fMRI Time-Series Revisited - Again. Neuroimage 2, 173-181, 1995. Would this be the correct citation? > >> My second question is when I ran the ROI analyses looking at the >> diagnosis x BMI interaction effect it outputs an array of beta values for >> each regressor. In addition to each groups beta value (for BMI) I'm >> interested in the beta value of the interaction (ie diagnosis x BMI). I was >> wondering how do i go about obtaining this? Would I have to create a new >> matrix with the interaction term included in it? >> >> If so would the analysis essentially be one group with the diagnosis x >> BMI interaction term plus the three co-variates? >> >> If you are using an FSGD file and have used DODS, then you can create an >> interaction contrast. Send me your fsgd file if you want further help >> > Yes I was using DODS approach for this analysis, I've attached my FSGD > file to this email. > > > You have 2 groups and 4 coviariates so 10 regressors. The dx BMI > interaction would need a contrast matrix > 0 0 1 -1 0 0 ... the rest 0s > BTW, sex should not be a covariate. You really need to have four groups, > P-male, P-female, HC-male, and HC-female (which would change the contrast > above) > Also, I would normalize the age and ICV > > Thanks for the correction I'll update my matrix accordingly to four groups and normalize the variables! The contrast matrix I ran was actually the same you suggested however it pastes an array of beta values for each 10 regressors. However, I was interested in obtaining a beta value that represents the interaction. > >> _______________________________________________ >> Freesurfer mailing >> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >> >> >> _______________________________________________ >> Freesurfer mailing list >> Freesurfer@nmr.mgh.harvard.edu >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > _______________________________________________ > Freesurfer mailing > listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer