help > Disparity between CONN t-stat result and manual
Showing 1-2 of 2 posts
Display:
Results per page:
Jun 29, 2020  04:06 AM | Jeremy Smith
Disparity between CONN t-stat result and manual
One "last" question...
  • I have two groups, A and B. I've been calculating the difference in mean resting state connectivity between A and B for a region, SEED, against all other ROIs. 
  • When I select the two groups, the condition (there's only one: rest), and the SEED, the ROI-ROI carousel plot pops up and I can get t-stats with the "extended statistics" option. (For comparison with my "manual method" below, I'm showing just p(FDR)-corrected results -- "parametric univariate statistics" -- in this image.)
(PICTURE ATTACHED)
  • These t-stats are telling me that the t(A > B) for some connection, SEED-ROIx, is significant. However, when I compute the t-statistic for SEED-ROIx manually using ttest2 in MATLAB...

ttest2(connmat(group=A, SEED, ROIx), connmat(group=B, SEED, ROIx))
  • The t-statistic is not significant. It's not even close. And the mean beta weights for SEED-ROIx for groups A and B are really, really close to each other. As in, almost the same -- differing by .01 or so.
p = 0.8362
stats.tstat = 0.2049
mean +/- sd for group A: 0.5870±0.2120 
...for group B: 0.5751±0.2160

I'm pulling the ROI names and indices and the beta weights directly from the resultsROI_Condition000.mat file. What am I doing wrong here that's causing the disparity?

Thanks,
Jeremy Smith (again)
Attachment: Picture1.png
Jul 7, 2020  06:07 PM | Alfonso Nieto-Castanon - Boston University
RE: Disparity between CONN t-stat result and manual
Hi Jeremy,

Not sure about this, in general the t-statistic and uncorrected p-values in your analyses should be identical to the ones provided by ttest2 since both are actually implementing exactly the same test (you can check that, for example, using the code below showing how CONN's GLM outputs exactly the same stats as ttest2).

Could you select the 'display design' option in CONN to make sure that you are correctly specifying  a two-sample t-test in your second-level results tab? (if in doubt send me your ROI.mat file and I will double-check if I see anything strange thre). If that looks fine, the only other possible reason I can think of for the discrepancy would be a mismatch when identifying the proper connectivity values from the connectivity matrices...

Best
Alfonso


y=randn(21,1); % data groupA
x=randn(18,1); % data groupB

[h,p,ci,stats]=ttest2(x,y,'tail','right'); % ttest2 method
disp([p stats.tstat stats.df]); % p-value t-stat and df

[h,t,p,dof]=conn_glm([ones(size(x)) zeros(size(x)); zeros(size(y)) ones(size(y))],[x;y],[1 -1]); % conn GLM method
disp([p t dof]) % p-value t-stat and df

Originally posted by Jeremy Smith:
One "last" question...
  • I have two groups, A and B. I've been calculating the difference in mean resting state connectivity between A and B for a region, SEED, against all other ROIs. 
  • When I select the two groups, the condition (there's only one: rest), and the SEED, the ROI-ROI carousel plot pops up and I can get t-stats with the "extended statistics" option. (For comparison with my "manual method" below, I'm showing just p(FDR)-corrected results -- "parametric univariate statistics" -- in this image.)
(PICTURE ATTACHED)
  • These t-stats are telling me that the t(A > B) for some connection, SEED-ROIx, is significant. However, when I compute the t-statistic for SEED-ROIx manually using ttest2 in MATLAB...

ttest2(connmat(group=A, SEED, ROIx), connmat(group=B, SEED, ROIx))
  • The t-statistic is not significant. It's not even close. And the mean beta weights for SEED-ROIx for groups A and B are really, really close to each other. As in, almost the same -- differing by .01 or so.
p = 0.8362
stats.tstat = 0.2049
mean +/- sd for group A: 0.5870±0.2120 
...for group B: 0.5751±0.2160

I'm pulling the ROI names and indices and the beta weights directly from the resultsROI_Condition000.mat file. What am I doing wrong here that's causing the disparity?

Thanks,
Jeremy Smith (again)