import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from nilearn import image
from nilearn import plotting
import statsmodels.api as sm
import statsmodels.formula.api as smf
from scipy import stats
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/statsmodels/compat/pandas.py:56: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead. from pandas.core import datetools
path_data = '/Users/AngelaTam/Desktop/adsf/adni1_vbm_adcn_subtypes_20171209/'
# load adni csv
adni1_df = pd.read_csv(path_data + '7clus/adni1_model_weights.csv')
adni2_df = pd.read_csv(path_data + '7clus/adni2_model_weights.csv')
adni1_mci = pd.read_csv(path_data + '7clus/adni1_mci_filter_model_weights.csv')
adni2_mci = pd.read_csv(path_data + '7clus/adni2_mci_filter_model_weights.csv')
adni1_df.set_index('RID',inplace=True)
adni2_df.set_index('RID',inplace=True)
adni1_mci.set_index('RID',inplace=True)
adni2_mci.set_index('RID',inplace=True)
# get rid of duplicates from ADNI1 in ADNI2
adni2_df = adni2_df.loc[set(adni2_df.index)-set(adni1_df.index)]
# get just ad & cn subjects
adni1_adcn = adni1_df.loc[set(adni1_df.index)-set(adni1_mci.index)]
adni2_adcn = adni2_df.loc[set(adni2_df.index)-set(adni2_mci.index)]
frames = [adni1_adcn, adni1_mci, adni2_adcn, adni2_mci]
adni_df = pd.concat(frames)
adni_df.reset_index(inplace=True)
# add categorical variable for diagnosis
for i,row in adni_df.iterrows():
cn = row[adni_df.columns.get_loc("CN")]
mci = row[adni_df.columns.get_loc("MCI")]
ad = row[adni_df.columns.get_loc("AD")]
conv_2_ad = row[adni_df.columns.get_loc("conv_2_ad")]
if cn == 1:
adni_df.ix[i,'diagnosis'] = 'CN'
adni_df.ix[i,'sMCI'] = 0
adni_df.ix[i,'pMCI'] = 0
if mci == 1 and conv_2_ad == 0:
adni_df.ix[i,'diagnosis'] = 'sMCI'
adni_df.ix[i,'sMCI'] = 1
adni_df.ix[i,'pMCI'] = 0
if mci == 1 and conv_2_ad == 1:
adni_df.ix[i,'diagnosis'] = 'pMCI'
adni_df.ix[i,'sMCI'] = 0
adni_df.ix[i,'pMCI'] = 1
if ad == 1:
adni_df.ix[i,'diagnosis'] = 'AD'
adni_df.ix[i,'sMCI'] = 0
adni_df.ix[i,'pMCI'] = 0
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/ipykernel/__main__.py:8: DeprecationWarning: .ix is deprecated. Please use .loc for label based indexing or .iloc for positional indexing See the documentation here: http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated
# get rid of NaNs
adni_df.dropna(axis=0, how='any', subset=['diagnosis','age_scan','mean_gm','tiv','APOE4_bin','sub1'],inplace=True)
# load subtype nifti
sub_img = image.load_img(path_data + '7clus/mean_subtype.nii')
n_list = [1,2,3,4,5,6,7]
for n_sub in n_list:
sub_vol = image.index_img(sub_img, n_sub-1)
plotting.plot_stat_map(sub_vol,vmax=0.1,
output_file=path_data + '7clus/mean_subtype_%s.png'%n_sub)
image.index_img?
def get_subtype_results(sub_img, n_sub, adni_df):
print('Running analyses for subtype %s ....'%n_sub)
# load volume
sub_vol = image.index_img(sub_img, n_sub-1)
plotting.plot_stat_map(sub_vol,display_mode="z",cut_coords=(-43,-31,-21,-10,0,31,42,54,63),vmax=0.1)
plotting.show()
# weight distributions
sns.set_palette("colorblind",4)
sns.distplot(adni_df[adni_df.CN==1]['sub%s'%n_sub].values,10,label='CN', kde=False)
sns.distplot(adni_df[adni_df.sMCI==1]['sub%s'%n_sub].values,10,label='sMCI', kde=False)
sns.distplot(adni_df[adni_df.pMCI==1]['sub%s'%n_sub].values,10,label='pMCI', kde=False)
sns.distplot(adni_df[adni_df.AD==1]['sub%s'%n_sub].values,10,label='AD', kde=False)
plt.legend(loc='upper right')
plt.ylim(0,120)
plt.ylabel('# subjects')
plt.xlabel('weight')
plt.show()
##################### GLM on ADNI dx groups
# full model with dx
print('############################################################')
print('GLM results for effect of diagnosis on subtype weight')
print('############################################################')
f_model = smf.ols('sub%s ~ mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI'%n_sub, data=adni_df).fit()
# reduced model without dx
r_model = smf.ols('sub%s ~ mean_gm + tiv + age_scan + gender'%n_sub, data=adni_df).fit()
# add residuals to dataframe
adni_df['sub%s_resid'%n_sub] = r_model.resid
# boxplot of weights across ADNI diagnosis
x_order = ['CN','sMCI','pMCI','AD']
sns.boxplot(x="diagnosis", y="sub%s_resid"%n_sub, data=adni_df, fliersize=0, order=x_order)
sns.swarmplot(x="diagnosis",y="sub%s_resid"%n_sub,data=adni_df, color="0.25", size=3, order=x_order)
plt.show()
# pairwise post hoc ttests
mod = sm.stats.multicomp.MultiComparison(adni_df['sub%s'%n_sub],adni_df['diagnosis'])
pval = mod.allpairtest(stats.ttest_ind, method='bonf')
print(f_model.summary())
print('############################################################')
print('F test on full and reduced model:')
print('############################################################')
print(sm.stats.anova_lm(r_model,f_model,test='F'))
print('############################################################')
print('Pairwise post hoc t-tests between groups')
print('############################################################')
print(mod.tukeyhsd())
print(pval[0])
############################# GLM on APOE4 in ADNI
print('############################################################')
print('GLM results for effect of APOE4')
print('############################################################')
f_model = smf.ols('sub%s ~ mean_gm + tiv + age_scan + gender + APOE4_bin'%n_sub, data=adni_df).fit()
# reduced model without dx
r_model = smf.ols('sub%s ~ mean_gm + tiv + age_scan + gender'%n_sub, data=adni_df).fit()
# pairwise post hoc ttests
mod = sm.stats.multicomp.MultiComparison(adni_df['sub%s'%n_sub],adni_df['APOE4_bin'])
pval = mod.allpairtest(stats.ttest_ind, method='bonf')
# plot
sns.boxplot(x="APOE4_bin",y='sub%s_resid'%n_sub,data=adni_df,fliersize=0)
sns.swarmplot(x="APOE4_bin",y="sub%s_resid"%n_sub,data=adni_df,color="0.25",size=3)
plt.show()
print(f_model.summary())
print('############################################################')
print('Pairwise post hoc t-tests between groups')
print('############################################################')
print(mod.tukeyhsd())
print(pval[0])
############################# GLM on ADNI AV45
# full model with subtype
print('############################################################')
print('GLM results for effect of subtype weight on amyloid (AV45)')
print('############################################################')
f_model = smf.ols('AV45 ~ sub%s + mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI'%n_sub, data=adni_df).fit()
# reduced model without subtype
r_model = smf.ols('AV45 ~ mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI', data=adni_df).fit()
# plot
adni_df['av45_resid'] = r_model.resid
sns.regplot(x="sub%s"%n_sub,y="av45_resid",data=adni_df)
plt.show()
print(f_model.summary())
print('############################################################')
print('F test on full and reduced model:')
print('############################################################')
print(sm.stats.anova_lm(r_model,f_model,test='F'))
############################# GLM on ADNI CSF ABETA
# full model with subtype
print('############################################################')
print('GLM results for effect of subtype weight on amyloid (CSF)')
print('############################################################')
f_model = smf.ols('ABETA ~ sub%s + mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI'%n_sub, data=adni_df).fit()
# reduced model without subtype
r_model = smf.ols('ABETA ~ mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI', data=adni_df).fit()
# plot
adni_df['abeta_resid'] = r_model.resid
sns.regplot(x="sub%s"%n_sub,y="abeta_resid",data=adni_df)
plt.show()
print(f_model.summary())
print('############################################################')
print('F test on full and reduced model:')
print('############################################################')
print(sm.stats.anova_lm(r_model,f_model,test='F'))
############################# GLM on ADNI CSF tau
# full model with subtype
print('############################################################')
print('GLM results for effect of subtype weight on tau (CSF)')
print('############################################################')
f_model = smf.ols('TAU ~ sub%s + mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI'%n_sub, data=adni_df).fit()
# reduced model without subtype
r_model = smf.ols('TAU ~ mean_gm + tiv + age_scan + gender + AD + sMCI + pMCI', data=adni_df).fit()
# plot
adni_df['tau_resid'] = r_model.resid
sns.regplot(x="sub%s"%n_sub,y="tau_resid",data=adni_df)
plt.show()
print(f_model.summary())
print('############################################################')
print('F test on full and reduced model:')
print('############################################################')
print(sm.stats.anova_lm(r_model,f_model,test='F'))
############################## GLM on MMSE
# full model with subtype
print('############################################################')
print('GLM results for effect of subtype weight on MMSE')
print('############################################################')
f_model = smf.ols('MMSE_bl ~ sub%s + mean_gm + tiv + age_scan + gender '%n_sub, data=adni_df).fit()
r_model = smf.ols('MMSE_bl ~ mean_gm + tiv + age_scan + gender ', data=adni_df).fit()
# plot
adni_df['MMSE_resid'] = r_model.resid
sns.regplot(x='sub%s'%n_sub,y='MMSE_resid',data=adni_df)
plt.show()
print(f_model.summary())
print('############################################################')
print('F test on full and reduced model:')
print('############################################################')
print(sm.stats.anova_lm(r_model,f_model,test='F'))
get_subtype_results(sub_img, 1, adni_df)
Running analyses for subtype 1 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub1 R-squared: 0.020 Model: OLS Adj. R-squared: 0.015 Method: Least Squares F-statistic: 3.784 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.000450 Time: 20:09:25 Log-Likelihood: 718.20 No. Observations: 1305 AIC: -1420. Df Residuals: 1297 BIC: -1379. Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.1433 0.082 -1.757 0.079 -0.303 0.017 mean_gm 0.2339 0.103 2.261 0.024 0.031 0.437 tiv -5.438e-09 3.21e-08 -0.170 0.865 -6.84e-08 5.75e-08 age_scan 0.0005 0.001 0.866 0.387 -0.001 0.002 gender 0.0026 0.008 0.326 0.745 -0.013 0.018 AD 0.0431 0.012 3.612 0.000 0.020 0.066 sMCI -0.0014 0.010 -0.136 0.891 -0.021 0.018 pMCI 0.0418 0.012 3.581 0.000 0.019 0.065 ============================================================================== Omnibus: 28.418 Durbin-Watson: 1.932 Prob(Omnibus): 0.000 Jarque-Bera (JB): 32.208 Skew: 0.307 Prob(JB): 1.01e-07 Kurtosis: 3.463 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 25.916996 0.0 NaN NaN NaN 1 1297.0 25.416490 3.0 0.500506 8.513583 0.000013 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- AD CN -0.0337 -0.0625 -0.0049 True AD pMCI 0.0019 -0.0299 0.0337 False AD sMCI -0.0362 -0.0648 -0.0075 True CN pMCI 0.0356 0.0065 0.0647 True CN sMCI -0.0024 -0.0281 0.0232 False pMCI sMCI -0.0381 -0.067 -0.0091 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN 2.8784 0.0041 0.0248 True AD pMCI -0.1344 0.8931 1.0 False AD sMCI 3.0485 0.0024 0.0144 True CN pMCI -3.3872 0.0007 0.0045 True CN sMCI 0.2738 0.7843 1.0 False pMCI sMCI 3.5521 0.0004 0.0025 True --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub1 R-squared: 0.005 Model: OLS Adj. R-squared: 0.002 Method: Least Squares F-statistic: 1.400 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.221 Time: 20:09:28 Log-Likelihood: 708.51 No. Observations: 1305 AIC: -1405. Df Residuals: 1299 BIC: -1374. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.0915 0.081 -1.135 0.257 -0.250 0.067 mean_gm 0.0610 0.096 0.633 0.527 -0.128 0.250 tiv 1.59e-08 3.19e-08 0.499 0.618 -4.67e-08 7.84e-08 age_scan 0.0003 0.001 0.558 0.577 -0.001 0.002 gender 9.454e-05 0.008 0.012 0.991 -0.016 0.016 APOE4_bin 0.0194 0.008 2.463 0.014 0.004 0.035 ============================================================================== Omnibus: 36.731 Durbin-Watson: 1.932 Prob(Omnibus): 0.000 Jarque-Bera (JB): 43.066 Skew: 0.352 Prob(JB): 4.45e-10 Kurtosis: 3.545 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 =========================================== group1 group2 meandiff lower upper reject ------------------------------------------- 0.0 1.0 0.0188 0.0035 0.0341 True ------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 ============================================ group1 group2 stat pval pval_corr reject -------------------------------------------- 0.0 1.0 -2.4118 0.016 0.016 True -------------------------------------------- ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.294 Model: OLS Adj. R-squared: 0.282 Method: Least Squares F-statistic: 25.58 Date: Sun, 10 Dec 2017 Prob (F-statistic): 4.58e-33 Time: 20:09:29 Log-Likelihood: 117.51 No. Observations: 501 AIC: -217.0 Df Residuals: 492 BIC: -179.1 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8556 0.209 4.093 0.000 0.445 1.266 sub1 0.0852 0.068 1.248 0.213 -0.049 0.219 mean_gm -0.1829 0.247 -0.740 0.460 -0.668 0.303 tiv 8.474e-08 7.33e-08 1.156 0.248 -5.93e-08 2.29e-07 age_scan 0.0026 0.001 1.866 0.063 -0.000 0.005 gender -0.0453 0.019 -2.442 0.015 -0.082 -0.009 AD 0.2623 0.027 9.619 0.000 0.209 0.316 sMCI 0.0490 0.021 2.380 0.018 0.009 0.090 pMCI 0.2910 0.030 9.635 0.000 0.232 0.350 ============================================================================== Omnibus: 25.110 Durbin-Watson: 1.917 Prob(Omnibus): 0.000 Jarque-Bera (JB): 28.027 Skew: 0.522 Prob(JB): 8.20e-07 Kurtosis: 3.504 Cond. No. 6.95e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.95e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.349708 1.0 0.058069 1.55698 0.212701 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.238 Model: OLS Adj. R-squared: 0.225 Method: Least Squares F-statistic: 17.99 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.87e-23 Time: 20:09:30 Log-Likelihood: -2487.6 No. Observations: 470 AIC: 4993. Df Residuals: 461 BIC: 5031. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 228.0049 45.328 5.030 0.000 138.930 317.080 sub1 -20.7563 16.356 -1.269 0.205 -52.898 11.386 mean_gm -39.5341 61.996 -0.638 0.524 -161.363 82.295 tiv 1.699e-05 1.88e-05 0.903 0.367 -2e-05 5.4e-05 age_scan -0.5238 0.342 -1.529 0.127 -1.197 0.149 gender -6.5250 4.757 -1.372 0.171 -15.873 2.823 AD -67.5167 6.989 -9.661 0.000 -81.251 -53.783 sMCI -29.3373 5.814 -5.046 0.000 -40.762 -17.913 pMCI -55.8853 6.937 -8.057 0.000 -69.517 -42.254 ============================================================================== Omnibus: 20.975 Durbin-Watson: 2.053 Prob(Omnibus): 0.000 Jarque-Bera (JB): 22.553 Skew: 0.525 Prob(JB): 1.27e-05 Kurtosis: 3.225 Cond. No. 6.16e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.16e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.088703e+06 1.0 3803.11315 1.610389 0.205077 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.201 Model: OLS Adj. R-squared: 0.187 Method: Least Squares F-statistic: 14.12 Date: Sun, 10 Dec 2017 Prob (F-statistic): 2.19e-18 Time: 20:09:31 Log-Likelihood: -2435.3 No. Observations: 457 AIC: 4889. Df Residuals: 448 BIC: 4926. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 39.4324 47.474 0.831 0.407 -53.867 132.732 sub1 55.4086 17.424 3.180 0.002 21.166 89.651 mean_gm 6.1240 66.076 0.093 0.926 -123.733 135.981 tiv 5.953e-06 1.98e-05 0.301 0.763 -3.29e-05 4.48e-05 age_scan 0.3036 0.359 0.846 0.398 -0.401 1.009 gender -15.8416 5.037 -3.145 0.002 -25.740 -5.943 AD 57.4518 7.318 7.851 0.000 43.070 71.834 sMCI 21.8381 6.131 3.562 0.000 9.789 33.887 pMCI 41.6000 7.287 5.709 0.000 27.280 55.920 ============================================================================== Omnibus: 251.345 Durbin-Watson: 1.849 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2524.685 Skew: 2.175 Prob(JB): 0.00 Kurtosis: 13.661 Cond. No. 6.23e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.23e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.137680e+06 1.0 25681.241106 10.112857 0.001575 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.136 Model: OLS Adj. R-squared: 0.132 Method: Least Squares F-statistic: 40.80 Date: Sun, 10 Dec 2017 Prob (F-statistic): 4.53e-39 Time: 20:09:32 Log-Likelihood: -3036.7 No. Observations: 1305 AIC: 6085. Df Residuals: 1299 BIC: 6117. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.4949 1.412 15.219 0.000 18.724 24.266 sub1 -2.3133 0.488 -4.739 0.000 -3.271 -1.356 mean_gm 21.5471 1.697 12.695 0.000 18.218 24.877 tiv -2.324e-06 5.62e-07 -4.135 0.000 -3.43e-06 -1.22e-06 age_scan 0.0157 0.011 1.465 0.143 -0.005 0.037 gender 0.3356 0.142 2.362 0.018 0.057 0.614 ============================================================================== Omnibus: 121.611 Durbin-Watson: 1.932 Prob(Omnibus): 0.000 Jarque-Bera (JB): 154.745 Skew: -0.828 Prob(JB): 2.50e-34 Kurtosis: 3.319 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.840950 0.0 NaN NaN NaN 1 1299.0 8023.148389 1.0 138.692561 22.455229 0.000002
get_subtype_results(sub_img, 2, adni_df)
Running analyses for subtype 2 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub2 R-squared: 0.024 Model: OLS Adj. R-squared: 0.018 Method: Least Squares F-statistic: 4.466 Date: Sun, 10 Dec 2017 Prob (F-statistic): 6.34e-05 Time: 20:09:38 Log-Likelihood: 925.57 No. Observations: 1305 AIC: -1835. Df Residuals: 1297 BIC: -1794. Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.0577 0.070 -0.829 0.407 -0.194 0.079 mean_gm 0.1982 0.088 2.246 0.025 0.025 0.371 tiv -3.148e-08 2.74e-08 -1.150 0.250 -8.52e-08 2.22e-08 age_scan 0.0002 0.001 0.415 0.678 -0.001 0.001 gender 0.0016 0.007 0.229 0.819 -0.012 0.015 AD 0.0479 0.010 4.708 0.000 0.028 0.068 sMCI 0.0067 0.009 0.784 0.433 -0.010 0.024 pMCI 0.0387 0.010 3.890 0.000 0.019 0.058 ============================================================================== Omnibus: 65.603 Durbin-Watson: 2.065 Prob(Omnibus): 0.000 Jarque-Bera (JB): 76.955 Skew: 0.530 Prob(JB): 1.95e-17 Kurtosis: 3.542 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 18.938195 0.0 NaN NaN NaN 1 1297.0 18.496522 3.0 0.441673 10.323568 0.000001 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- AD CN -0.0398 -0.0643 -0.0152 True AD pMCI -0.0062 -0.0334 0.0209 False AD sMCI -0.0338 -0.0582 -0.0093 True CN pMCI 0.0335 0.0087 0.0584 True CN sMCI 0.006 -0.0159 0.0278 False pMCI sMCI -0.0275 -0.0523 -0.0028 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN 4.0548 0.0001 0.0003 True AD pMCI 0.5416 0.5884 1.0 False AD sMCI 3.551 0.0004 0.0025 True CN pMCI -3.478 0.0005 0.0032 True CN sMCI -0.7533 0.4515 1.0 False pMCI sMCI 2.9499 0.0033 0.0198 True --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub2 R-squared: 0.002 Model: OLS Adj. R-squared: -0.002 Method: Least Squares F-statistic: 0.4266 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.830 Time: 20:09:41 Log-Likelihood: 911.10 No. Observations: 1305 AIC: -1810. Df Residuals: 1299 BIC: -1779. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.0095 0.069 0.138 0.891 -0.126 0.145 mean_gm 0.0201 0.083 0.243 0.808 -0.142 0.182 tiv -8.611e-09 2.73e-08 -0.315 0.752 -6.22e-08 4.49e-08 age_scan -8.932e-05 0.001 -0.171 0.865 -0.001 0.001 gender -0.0007 0.007 -0.097 0.923 -0.014 0.013 APOE4_bin 0.0091 0.007 1.359 0.175 -0.004 0.022 ============================================================================== Omnibus: 71.705 Durbin-Watson: 2.038 Prob(Omnibus): 0.000 Jarque-Bera (JB): 85.208 Skew: 0.558 Prob(JB): 3.14e-19 Kurtosis: 3.569 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================ group1 group2 meandiff lower upper reject -------------------------------------------- 0.0 1.0 0.0092 -0.0039 0.0223 False -------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- 0.0 1.0 -1.3774 0.1686 0.1686 False --------------------------------------------- ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.292 Model: OLS Adj. R-squared: 0.280 Method: Least Squares F-statistic: 25.37 Date: Sun, 10 Dec 2017 Prob (F-statistic): 8.34e-33 Time: 20:09:42 Log-Likelihood: 116.89 No. Observations: 501 AIC: -215.8 Df Residuals: 492 BIC: -177.8 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8434 0.209 4.032 0.000 0.432 1.254 sub2 0.0461 0.081 0.567 0.571 -0.114 0.206 mean_gm -0.1745 0.247 -0.706 0.481 -0.661 0.311 tiv 8.869e-08 7.34e-08 1.209 0.227 -5.55e-08 2.33e-07 age_scan 0.0026 0.001 1.863 0.063 -0.000 0.005 gender -0.0448 0.019 -2.415 0.016 -0.081 -0.008 AD 0.2638 0.027 9.667 0.000 0.210 0.317 sMCI 0.0496 0.021 2.405 0.017 0.009 0.090 pMCI 0.2939 0.030 9.754 0.000 0.235 0.353 ============================================================================== Omnibus: 24.460 Durbin-Watson: 1.912 Prob(Omnibus): 0.000 Jarque-Bera (JB): 27.271 Skew: 0.512 Prob(JB): 1.20e-06 Kurtosis: 3.509 Cond. No. 6.94e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.94e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.395756 1.0 0.012021 0.321499 0.570967 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.241 Model: OLS Adj. R-squared: 0.228 Method: Least Squares F-statistic: 18.32 Date: Sun, 10 Dec 2017 Prob (F-statistic): 7.04e-24 Time: 20:09:43 Log-Likelihood: -2486.6 No. Observations: 470 AIC: 4991. Df Residuals: 461 BIC: 5029. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 234.6579 45.193 5.192 0.000 145.848 323.468 sub2 -36.6387 19.142 -1.914 0.056 -74.255 0.978 mean_gm -58.2509 61.062 -0.954 0.341 -178.245 61.743 tiv 1.924e-05 1.87e-05 1.027 0.305 -1.76e-05 5.61e-05 age_scan -0.5642 0.342 -1.648 0.100 -1.237 0.109 gender -7.1739 4.731 -1.516 0.130 -16.470 2.122 AD -68.0484 6.871 -9.903 0.000 -81.552 -54.545 sMCI -29.8355 5.789 -5.154 0.000 -41.211 -18.460 pMCI -55.6349 6.903 -8.060 0.000 -69.199 -42.071 ============================================================================== Omnibus: 18.107 Durbin-Watson: 2.084 Prob(Omnibus): 0.000 Jarque-Bera (JB): 19.297 Skew: 0.494 Prob(JB): 6.45e-05 Kurtosis: 3.101 Cond. No. 6.09e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.09e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.083892e+06 1.0 8613.735123 3.663586 0.056233 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.191 Model: OLS Adj. R-squared: 0.176 Method: Least Squares F-statistic: 13.20 Date: Sun, 10 Dec 2017 Prob (F-statistic): 3.64e-17 Time: 20:09:45 Log-Likelihood: -2438.3 No. Observations: 457 AIC: 4895. Df Residuals: 448 BIC: 4932. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 35.8173 47.770 0.750 0.454 -58.064 129.699 sub2 -41.2373 20.403 -2.021 0.044 -81.336 -1.139 mean_gm 35.7058 65.613 0.544 0.587 -93.242 164.654 tiv 1.969e-06 1.98e-05 0.099 0.921 -3.7e-05 4.1e-05 age_scan 0.2507 0.362 0.693 0.489 -0.461 0.962 gender -14.5502 5.050 -2.881 0.004 -24.474 -4.626 AD 62.8786 7.266 8.654 0.000 48.600 77.157 sMCI 22.9726 6.160 3.729 0.000 10.866 35.079 pMCI 46.2359 7.310 6.325 0.000 31.871 60.601 ============================================================================== Omnibus: 243.094 Durbin-Watson: 1.886 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2229.641 Skew: 2.116 Prob(JB): 0.00 Kurtosis: 12.959 Cond. No. 6.15e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.15e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.152850e+06 1.0 10511.563084 4.084817 0.043864 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.135 Model: OLS Adj. R-squared: 0.132 Method: Least Squares F-statistic: 40.69 Date: Sun, 10 Dec 2017 Prob (F-statistic): 5.72e-39 Time: 20:09:46 Log-Likelihood: -3037.0 No. Observations: 1305 AIC: 6086. Df Residuals: 1299 BIC: 6117. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.7079 1.412 15.371 0.000 18.937 24.478 sub2 -2.6776 0.571 -4.688 0.000 -3.798 -1.557 mean_gm 21.4763 1.697 12.652 0.000 18.146 24.806 tiv -2.387e-06 5.62e-07 -4.246 0.000 -3.49e-06 -1.28e-06 age_scan 0.0148 0.011 1.385 0.166 -0.006 0.036 gender 0.3333 0.142 2.346 0.019 0.055 0.612 ============================================================================== Omnibus: 121.085 Durbin-Watson: 1.945 Prob(Omnibus): 0.000 Jarque-Bera (JB): 153.868 Skew: -0.825 Prob(JB): 3.87e-34 Kurtosis: 3.330 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.840950 0.0 NaN NaN NaN 1 1299.0 8026.061749 1.0 135.7792 21.975557 0.000003
get_subtype_results(sub_img, 3, adni_df)
Running analyses for subtype 3 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub3 R-squared: 0.006 Model: OLS Adj. R-squared: 0.001 Method: Least Squares F-statistic: 1.098 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.362 Time: 20:09:53 Log-Likelihood: 379.69 No. Observations: 1305 AIC: -743.4 Df Residuals: 1297 BIC: -702.0 Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.0178 0.106 -0.168 0.866 -0.225 0.190 mean_gm -0.1096 0.134 -0.817 0.414 -0.373 0.153 tiv 4.362e-08 4.16e-08 1.049 0.294 -3.79e-08 1.25e-07 age_scan -5.174e-05 0.001 -0.065 0.948 -0.002 0.002 gender -0.0043 0.010 -0.410 0.682 -0.025 0.016 AD -0.0360 0.015 -2.328 0.020 -0.066 -0.006 sMCI -0.0103 0.013 -0.791 0.429 -0.036 0.015 pMCI -0.0294 0.015 -1.946 0.052 -0.059 0.000 ============================================================================== Omnibus: 7.311 Durbin-Watson: 1.978 Prob(Omnibus): 0.026 Jarque-Bera (JB): 6.115 Skew: 0.090 Prob(JB): 0.0470 Kurtosis: 2.717 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 42.924134 0.0 NaN NaN NaN 1 1297.0 42.698948 3.0 0.225187 2.280048 0.077697 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================ group1 group2 meandiff lower upper reject -------------------------------------------- AD CN 0.0316 -0.0057 0.0688 False AD pMCI 0.0047 -0.0365 0.0458 False AD sMCI 0.0215 -0.0156 0.0586 False CN pMCI -0.0269 -0.0645 0.0108 False CN sMCI -0.0101 -0.0432 0.0231 False pMCI sMCI 0.0168 -0.0207 0.0543 False -------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN -2.1739 0.0301 0.1804 False AD pMCI -0.2903 0.7717 1.0 False AD sMCI -1.4789 0.1397 0.8379 False CN pMCI 1.85 0.0648 0.3887 False CN sMCI 0.7843 0.4331 1.0 False pMCI sMCI -1.1556 0.2483 1.0 False --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub3 R-squared: 0.001 Model: OLS Adj. R-squared: -0.003 Method: Least Squares F-statistic: 0.1784 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.971 Time: 20:09:56 Log-Likelihood: 376.29 No. Observations: 1305 AIC: -740.6 Df Residuals: 1299 BIC: -709.5 Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.0741 0.104 -0.713 0.476 -0.278 0.130 mean_gm 0.0197 0.124 0.158 0.875 -0.224 0.264 tiv 2.645e-08 4.11e-08 0.643 0.520 -5.42e-08 1.07e-07 age_scan 0.0002 0.001 0.298 0.766 -0.001 0.002 gender -0.0030 0.010 -0.289 0.772 -0.023 0.017 APOE4_bin -0.0023 0.010 -0.227 0.820 -0.022 0.018 ============================================================================== Omnibus: 6.951 Durbin-Watson: 1.971 Prob(Omnibus): 0.031 Jarque-Bera (JB): 5.861 Skew: 0.088 Prob(JB): 0.0534 Kurtosis: 2.723 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================ group1 group2 meandiff lower upper reject -------------------------------------------- 0.0 1.0 -0.0027 -0.0224 0.0171 False -------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 ============================================ group1 group2 stat pval pval_corr reject -------------------------------------------- 0.0 1.0 0.2653 0.7909 0.7909 False -------------------------------------------- ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.292 Model: OLS Adj. R-squared: 0.281 Method: Least Squares F-statistic: 25.39 Date: Sun, 10 Dec 2017 Prob (F-statistic): 7.74e-33 Time: 20:09:57 Log-Likelihood: 116.96 No. Observations: 501 AIC: -215.9 Df Residuals: 492 BIC: -178.0 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8411 0.209 4.020 0.000 0.430 1.252 sub3 -0.0334 0.049 -0.689 0.491 -0.129 0.062 mean_gm -0.1740 0.247 -0.703 0.482 -0.660 0.312 tiv 9.089e-08 7.35e-08 1.237 0.217 -5.34e-08 2.35e-07 age_scan 0.0026 0.001 1.842 0.066 -0.000 0.005 gender -0.0450 0.019 -2.423 0.016 -0.081 -0.009 AD 0.2638 0.027 9.670 0.000 0.210 0.317 sMCI 0.0495 0.021 2.398 0.017 0.009 0.090 pMCI 0.2952 0.030 9.829 0.000 0.236 0.354 ============================================================================== Omnibus: 23.940 Durbin-Watson: 1.910 Prob(Omnibus): 0.000 Jarque-Bera (JB): 26.601 Skew: 0.506 Prob(JB): 1.67e-06 Kurtosis: 3.502 Cond. No. 6.94e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.94e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.390038 1.0 0.01774 0.474597 0.491204 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.235 Model: OLS Adj. R-squared: 0.222 Method: Least Squares F-statistic: 17.73 Date: Sun, 10 Dec 2017 Prob (F-statistic): 3.99e-23 Time: 20:09:58 Log-Likelihood: -2488.4 No. Observations: 470 AIC: 4995. Df Residuals: 461 BIC: 5032. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 231.2915 45.337 5.102 0.000 142.199 320.384 sub3 -2.4210 13.074 -0.185 0.853 -28.114 23.272 mean_gm -52.1598 61.290 -0.851 0.395 -172.603 68.283 tiv 1.853e-05 1.88e-05 0.985 0.325 -1.84e-05 5.55e-05 age_scan -0.5263 0.343 -1.534 0.126 -1.201 0.148 gender -7.0488 4.750 -1.484 0.139 -16.383 2.286 AD -69.1868 6.873 -10.067 0.000 -82.693 -55.681 sMCI -29.7451 5.823 -5.108 0.000 -41.188 -18.303 pMCI -57.0219 6.894 -8.272 0.000 -70.569 -43.475 ============================================================================== Omnibus: 22.082 Durbin-Watson: 2.065 Prob(Omnibus): 0.000 Jarque-Bera (JB): 23.890 Skew: 0.539 Prob(JB): 6.49e-06 Kurtosis: 3.239 Cond. No. 6.09e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.09e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.092425e+06 1.0 81.253993 0.034289 0.853175 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.185 Model: OLS Adj. R-squared: 0.171 Method: Least Squares F-statistic: 12.75 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.43e-16 Time: 20:09:58 Log-Likelihood: -2439.8 No. Observations: 457 AIC: 4898. Df Residuals: 448 BIC: 4935. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 31.3384 47.884 0.654 0.513 -62.767 125.443 sub3 15.0843 13.953 1.081 0.280 -12.337 42.506 mean_gm 39.3524 65.797 0.598 0.550 -89.956 168.661 tiv 1.748e-06 1.99e-05 0.088 0.930 -3.74e-05 4.09e-05 age_scan 0.3065 0.362 0.846 0.398 -0.406 1.019 gender -14.2556 5.067 -2.813 0.005 -24.214 -4.298 AD 61.5693 7.267 8.472 0.000 47.287 75.851 sMCI 22.6386 6.191 3.657 0.000 10.472 34.806 pMCI 44.9063 7.296 6.155 0.000 30.568 59.245 ============================================================================== Omnibus: 245.931 Durbin-Watson: 1.885 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2317.282 Skew: 2.138 Prob(JB): 0.00 Kurtosis: 13.169 Cond. No. 6.15e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.15e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.160334e+06 1.0 3027.040651 1.168727 0.280245 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.123 Model: OLS Adj. R-squared: 0.119 Method: Least Squares F-statistic: 36.34 Date: Sun, 10 Dec 2017 Prob (F-statistic): 6.36e-35 Time: 20:09:59 Log-Likelihood: -3046.5 No. Observations: 1305 AIC: 6105. Df Residuals: 1299 BIC: 6136. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.7032 1.423 15.254 0.000 18.912 24.495 sub3 0.6473 0.382 1.694 0.091 -0.102 1.397 mean_gm 21.4288 1.710 12.533 0.000 18.074 24.783 tiv -2.384e-06 5.66e-07 -4.210 0.000 -3.49e-06 -1.27e-06 age_scan 0.0151 0.011 1.402 0.161 -0.006 0.036 gender 0.3368 0.143 2.353 0.019 0.056 0.618 ============================================================================== Omnibus: 122.202 Durbin-Watson: 1.933 Prob(Omnibus): 0.000 Jarque-Bera (JB): 155.799 Skew: -0.834 Prob(JB): 1.47e-34 Kurtosis: 3.294 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.84095 0.0 NaN NaN NaN 1 1299.0 8143.85339 1.0 17.98756 2.869138 0.090533
get_subtype_results(sub_img, 4, adni_df)
Running analyses for subtype 4 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub4 R-squared: 0.033 Model: OLS Adj. R-squared: 0.028 Method: Least Squares F-statistic: 6.291 Date: Sun, 10 Dec 2017 Prob (F-statistic): 2.80e-07 Time: 20:10:05 Log-Likelihood: 528.78 No. Observations: 1305 AIC: -1042. Df Residuals: 1297 BIC: -1000. Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.1662 0.094 -1.762 0.078 -0.351 0.019 mean_gm 0.3169 0.120 2.650 0.008 0.082 0.552 tiv -2.332e-08 3.71e-08 -0.629 0.530 -9.61e-08 4.94e-08 age_scan 0.0007 0.001 0.980 0.327 -0.001 0.002 gender 0.0008 0.009 0.091 0.927 -0.017 0.019 AD 0.0746 0.014 5.411 0.000 0.048 0.102 sMCI 0.0058 0.012 0.498 0.619 -0.017 0.029 pMCI 0.0605 0.013 4.483 0.000 0.034 0.087 ============================================================================== Omnibus: 3.612 Durbin-Watson: 2.054 Prob(Omnibus): 0.164 Jarque-Bera (JB): 3.520 Skew: 0.093 Prob(JB): 0.172 Kurtosis: 2.827 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 35.119217 0.0 NaN NaN NaN 1 1297.0 33.977439 3.0 1.141777 14.528124 2.603900e-09 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- AD CN -0.0618 -0.0951 -0.0285 True AD pMCI -0.0099 -0.0468 0.0269 False AD sMCI -0.0577 -0.0909 -0.0245 True CN pMCI 0.0518 0.0182 0.0855 True CN sMCI 0.0041 -0.0256 0.0337 False pMCI sMCI -0.0478 -0.0813 -0.0142 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN 4.8293 0.0 0.0 True AD pMCI 0.6677 0.5046 1.0 False AD sMCI 4.3858 0.0 0.0001 True CN pMCI -4.046 0.0001 0.0004 True CN sMCI -0.3623 0.7172 1.0 False pMCI sMCI 3.6204 0.0003 0.0019 True --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub4 R-squared: 0.012 Model: OLS Adj. R-squared: 0.008 Method: Least Squares F-statistic: 3.042 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.00979 Time: 20:10:08 Log-Likelihood: 514.58 No. Observations: 1305 AIC: -1017. Df Residuals: 1299 BIC: -986.1 Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.0862 0.094 -0.922 0.357 -0.270 0.097 mean_gm 0.0484 0.112 0.432 0.666 -0.171 0.268 tiv 1.018e-08 3.7e-08 0.275 0.783 -6.24e-08 8.27e-08 age_scan 0.0004 0.001 0.577 0.564 -0.001 0.002 gender -0.0032 0.009 -0.341 0.733 -0.022 0.015 APOE4_bin 0.0351 0.009 3.842 0.000 0.017 0.053 ============================================================================== Omnibus: 3.339 Durbin-Watson: 2.068 Prob(Omnibus): 0.188 Jarque-Bera (JB): 3.398 Skew: 0.112 Prob(JB): 0.183 Kurtosis: 2.889 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 =========================================== group1 group2 meandiff lower upper reject ------------------------------------------- 0.0 1.0 0.0344 0.0166 0.0521 True ------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- 0.0 1.0 -3.7988 0.0002 0.0002 True --------------------------------------------- ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.292 Model: OLS Adj. R-squared: 0.280 Method: Least Squares F-statistic: 25.37 Date: Sun, 10 Dec 2017 Prob (F-statistic): 8.33e-33 Time: 20:10:09 Log-Likelihood: 116.89 No. Observations: 501 AIC: -215.8 Df Residuals: 492 BIC: -177.8 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8481 0.209 4.054 0.000 0.437 1.259 sub4 0.0331 0.058 0.569 0.570 -0.081 0.147 mean_gm -0.1722 0.247 -0.696 0.487 -0.658 0.314 tiv 8.561e-08 7.35e-08 1.165 0.244 -5.87e-08 2.3e-07 age_scan 0.0026 0.001 1.867 0.062 -0.000 0.005 gender -0.0447 0.019 -2.410 0.016 -0.081 -0.008 AD 0.2636 0.027 9.660 0.000 0.210 0.317 sMCI 0.0498 0.021 2.411 0.016 0.009 0.090 pMCI 0.2927 0.030 9.642 0.000 0.233 0.352 ============================================================================== Omnibus: 24.372 Durbin-Watson: 1.909 Prob(Omnibus): 0.000 Jarque-Bera (JB): 27.265 Skew: 0.507 Prob(JB): 1.20e-06 Kurtosis: 3.526 Cond. No. 6.94e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.94e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.395680 1.0 0.012097 0.323546 0.569744 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.252 Model: OLS Adj. R-squared: 0.239 Method: Least Squares F-statistic: 19.38 Date: Sun, 10 Dec 2017 Prob (F-statistic): 3.33e-25 Time: 20:10:09 Log-Likelihood: -2483.3 No. Observations: 470 AIC: 4985. Df Residuals: 461 BIC: 5022. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 230.2816 44.848 5.135 0.000 142.150 318.414 sub4 -45.7972 14.401 -3.180 0.002 -74.098 -17.496 mean_gm -40.5465 60.693 -0.668 0.504 -159.815 78.722 tiv 1.616e-05 1.86e-05 0.868 0.386 -2.04e-05 5.28e-05 age_scan -0.5293 0.339 -1.560 0.120 -1.196 0.138 gender -7.6776 4.702 -1.633 0.103 -16.918 1.562 AD -65.7893 6.882 -9.559 0.000 -79.314 -52.265 sMCI -29.0376 5.754 -5.046 0.000 -40.345 -17.730 pMCI -53.6660 6.899 -7.779 0.000 -67.223 -40.109 ============================================================================== Omnibus: 17.904 Durbin-Watson: 2.055 Prob(Omnibus): 0.000 Jarque-Bera (JB): 18.899 Skew: 0.480 Prob(JB): 7.87e-05 Kurtosis: 3.209 Cond. No. 6.09e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.09e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.069055e+06 1.0 23451.016247 10.112595 0.001572 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.191 Model: OLS Adj. R-squared: 0.176 Method: Least Squares F-statistic: 13.21 Date: Sun, 10 Dec 2017 Prob (F-statistic): 3.58e-17 Time: 20:10:10 Log-Likelihood: -2438.3 No. Observations: 457 AIC: 4895. Df Residuals: 448 BIC: 4932. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 33.1550 47.731 0.695 0.488 -60.649 126.959 sub4 31.4075 15.476 2.029 0.043 0.994 61.822 mean_gm 33.8798 65.659 0.516 0.606 -95.157 162.917 tiv 2.67e-06 1.98e-05 0.135 0.893 -3.63e-05 4.17e-05 age_scan 0.2976 0.361 0.824 0.410 -0.412 1.007 gender -13.9600 5.053 -2.763 0.006 -23.891 -4.029 AD 59.4368 7.328 8.111 0.000 45.035 73.839 sMCI 22.5035 6.165 3.650 0.000 10.387 34.620 pMCI 42.4761 7.351 5.778 0.000 28.030 56.922 ============================================================================== Omnibus: 245.120 Durbin-Watson: 1.888 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2260.923 Skew: 2.138 Prob(JB): 0.00 Kurtosis: 13.023 Cond. No. 6.15e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.15e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.152763e+06 1.0 10598.109825 4.118758 0.043001 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.145 Model: OLS Adj. R-squared: 0.142 Method: Least Squares F-statistic: 44.03 Date: Sun, 10 Dec 2017 Prob (F-statistic): 4.83e-42 Time: 20:10:11 Log-Likelihood: -3029.8 No. Observations: 1305 AIC: 6072. Df Residuals: 1299 BIC: 6103. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.5405 1.405 15.336 0.000 18.785 24.296 sub4 -2.5254 0.417 -6.054 0.000 -3.344 -1.707 mean_gm 21.4923 1.688 12.732 0.000 18.181 24.804 tiv -2.33e-06 5.59e-07 -4.167 0.000 -3.43e-06 -1.23e-06 age_scan 0.0156 0.011 1.460 0.144 -0.005 0.036 gender 0.3278 0.141 2.319 0.021 0.050 0.605 ============================================================================== Omnibus: 119.695 Durbin-Watson: 1.927 Prob(Omnibus): 0.000 Jarque-Bera (JB): 151.611 Skew: -0.816 Prob(JB): 1.20e-33 Kurtosis: 3.351 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.84095 0.0 NaN NaN NaN 1 1299.0 7937.86012 1.0 223.98083 36.653593 1.843826e-09
get_subtype_results(sub_img, 5, adni_df)
Running analyses for subtype 5 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub5 R-squared: 0.031 Model: OLS Adj. R-squared: 0.026 Method: Least Squares F-statistic: 6.017 Date: Sun, 10 Dec 2017 Prob (F-statistic): 6.41e-07 Time: 20:10:18 Log-Likelihood: 376.60 No. Observations: 1305 AIC: -737.2 Df Residuals: 1297 BIC: -695.8 Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.1909 0.106 1.802 0.072 -0.017 0.399 mean_gm -0.3491 0.134 -2.598 0.009 -0.613 -0.085 tiv 2.161e-08 4.17e-08 0.519 0.604 -6.01e-08 1.03e-07 age_scan -0.0007 0.001 -0.919 0.358 -0.002 0.001 gender -0.0011 0.010 -0.103 0.918 -0.022 0.019 AD -0.0844 0.015 -5.451 0.000 -0.115 -0.054 sMCI -0.0092 0.013 -0.704 0.481 -0.035 0.016 pMCI -0.0657 0.015 -4.333 0.000 -0.095 -0.036 ============================================================================== Omnibus: 5.329 Durbin-Watson: 2.094 Prob(Omnibus): 0.070 Jarque-Bera (JB): 4.255 Skew: 0.021 Prob(JB): 0.119 Kurtosis: 2.723 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 44.277121 0.0 NaN NaN NaN 1 1297.0 42.902194 3.0 1.374927 13.855393 6.767441e-09 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- AD CN 0.0703 0.0329 0.1077 True AD pMCI 0.0141 -0.0273 0.0555 False AD sMCI 0.0629 0.0256 0.1002 True CN pMCI -0.0562 -0.094 -0.0184 True CN sMCI -0.0074 -0.0407 0.0259 False pMCI sMCI 0.0488 0.0111 0.0865 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN -4.8617 0.0 0.0 True AD pMCI -0.8552 0.3928 1.0 False AD sMCI -4.2888 0.0 0.0001 True CN pMCI 3.8712 0.0001 0.0007 True CN sMCI 0.5807 0.5616 1.0 False pMCI sMCI -3.3122 0.001 0.0059 True --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub5 R-squared: 0.009 Model: OLS Adj. R-squared: 0.005 Method: Least Squares F-statistic: 2.318 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.0414 Time: 20:10:20 Log-Likelihood: 361.54 No. Observations: 1305 AIC: -711.1 Df Residuals: 1299 BIC: -680.0 Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.0957 0.105 0.910 0.363 -0.111 0.302 mean_gm -0.0488 0.126 -0.387 0.698 -0.296 0.198 tiv -1.619e-08 4.16e-08 -0.389 0.697 -9.78e-08 6.54e-08 age_scan -0.0004 0.001 -0.458 0.647 -0.002 0.001 gender 0.0033 0.011 0.313 0.754 -0.017 0.024 APOE4_bin -0.0341 0.010 -3.324 0.001 -0.054 -0.014 ============================================================================== Omnibus: 3.707 Durbin-Watson: 2.103 Prob(Omnibus): 0.157 Jarque-Bera (JB): 3.141 Skew: 0.015 Prob(JB): 0.208 Kurtosis: 2.762 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- 0.0 1.0 -0.0335 -0.0535 -0.0135 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 =========================================== group1 group2 stat pval pval_corr reject ------------------------------------------- 0.0 1.0 3.2908 0.001 0.001 True ------------------------------------------- ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.292 Model: OLS Adj. R-squared: 0.280 Method: Least Squares F-statistic: 25.31 Date: Sun, 10 Dec 2017 Prob (F-statistic): 9.64e-33 Time: 20:10:21 Log-Likelihood: 116.73 No. Observations: 501 AIC: -215.5 Df Residuals: 492 BIC: -177.5 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8462 0.209 4.045 0.000 0.435 1.257 sub5 -0.0077 0.052 -0.148 0.883 -0.110 0.095 mean_gm -0.1735 0.247 -0.701 0.484 -0.660 0.313 tiv 8.743e-08 7.35e-08 1.190 0.235 -5.7e-08 2.32e-07 age_scan 0.0026 0.001 1.855 0.064 -0.000 0.005 gender -0.0448 0.019 -2.414 0.016 -0.081 -0.008 AD 0.2636 0.027 9.656 0.000 0.210 0.317 sMCI 0.0494 0.021 2.394 0.017 0.009 0.090 pMCI 0.2947 0.030 9.729 0.000 0.235 0.354 ============================================================================== Omnibus: 24.509 Durbin-Watson: 1.911 Prob(Omnibus): 0.000 Jarque-Bera (JB): 27.383 Skew: 0.511 Prob(JB): 1.13e-06 Kurtosis: 3.518 Cond. No. 6.94e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.94e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.406959 1.0 0.000818 0.021862 0.882515 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.251 Model: OLS Adj. R-squared: 0.238 Method: Least Squares F-statistic: 19.33 Date: Sun, 10 Dec 2017 Prob (F-statistic): 3.77e-25 Time: 20:10:22 Log-Likelihood: -2483.5 No. Observations: 470 AIC: 4985. Df Residuals: 461 BIC: 5022. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 232.3526 44.861 5.179 0.000 144.195 320.511 sub5 40.4034 12.876 3.138 0.002 15.100 65.707 mean_gm -47.4700 60.613 -0.783 0.434 -166.581 71.641 tiv 1.716e-05 1.86e-05 0.922 0.357 -1.94e-05 5.37e-05 age_scan -0.5467 0.340 -1.610 0.108 -1.214 0.121 gender -7.8703 4.707 -1.672 0.095 -17.119 1.379 AD -65.9437 6.879 -9.587 0.000 -79.461 -52.426 sMCI -29.0103 5.756 -5.040 0.000 -40.322 -17.698 pMCI -53.8014 6.896 -7.802 0.000 -67.353 -40.250 ============================================================================== Omnibus: 17.115 Durbin-Watson: 2.057 Prob(Omnibus): 0.000 Jarque-Bera (JB): 18.012 Skew: 0.472 Prob(JB): 0.000123 Kurtosis: 3.173 Cond. No. 6.09e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.09e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.069660e+06 1.0 22845.986066 9.84612 0.001811 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.186 Model: OLS Adj. R-squared: 0.171 Method: Least Squares F-statistic: 12.76 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.40e-16 Time: 20:10:23 Log-Likelihood: -2439.8 No. Observations: 457 AIC: 4898. Df Residuals: 448 BIC: 4935. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 31.6444 47.880 0.661 0.509 -62.453 125.742 sub5 -15.2397 13.832 -1.102 0.271 -42.423 11.943 mean_gm 39.9413 65.775 0.607 0.544 -89.324 169.207 tiv 1.66e-06 1.99e-05 0.083 0.934 -3.74e-05 4.08e-05 age_scan 0.3069 0.362 0.847 0.397 -0.405 1.019 gender -14.0967 5.072 -2.779 0.006 -24.065 -4.129 AD 60.5211 7.345 8.239 0.000 46.086 74.957 sMCI 22.7597 6.185 3.680 0.000 10.605 34.914 pMCI 43.5163 7.370 5.904 0.000 29.032 58.001 ============================================================================== Omnibus: 247.265 Durbin-Watson: 1.892 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2331.490 Skew: 2.153 Prob(JB): 0.00 Kurtosis: 13.193 Cond. No. 6.15e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.15e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.160218e+06 1.0 3143.837472 1.213944 0.271144 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.146 Model: OLS Adj. R-squared: 0.143 Method: Least Squares F-statistic: 44.46 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.94e-42 Time: 20:10:24 Log-Likelihood: -3028.8 No. Observations: 1305 AIC: 6070. Df Residuals: 1299 BIC: 6101. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.5259 1.404 15.337 0.000 18.772 24.279 sub5 2.3053 0.371 6.210 0.000 1.577 3.034 mean_gm 21.4906 1.687 12.740 0.000 18.181 24.800 tiv -2.319e-06 5.59e-07 -4.152 0.000 -3.42e-06 -1.22e-06 age_scan 0.0155 0.011 1.452 0.147 -0.005 0.036 gender 0.3281 0.141 2.323 0.020 0.051 0.605 ============================================================================== Omnibus: 117.302 Durbin-Watson: 1.934 Prob(Omnibus): 0.000 Jarque-Bera (JB): 147.878 Skew: -0.807 Prob(JB): 7.74e-33 Kurtosis: 3.339 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.840950 0.0 NaN NaN NaN 1 1299.0 7926.541231 1.0 235.299719 38.560871 7.128979e-10
get_subtype_results(sub_img, 6, adni_df)
Running analyses for subtype 6 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub6 R-squared: 0.074 Model: OLS Adj. R-squared: 0.069 Method: Least Squares F-statistic: 14.70 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.56e-18 Time: 20:10:31 Log-Likelihood: 675.27 No. Observations: 1305 AIC: -1335. Df Residuals: 1297 BIC: -1293. Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.1618 0.084 -1.920 0.055 -0.327 0.004 mean_gm 0.4093 0.107 3.829 0.000 0.200 0.619 tiv -5.507e-08 3.31e-08 -1.661 0.097 -1.2e-07 9.96e-09 age_scan 0.0007 0.001 1.102 0.271 -0.001 0.002 gender 0.0054 0.008 0.647 0.518 -0.011 0.022 AD 0.1081 0.012 8.775 0.000 0.084 0.132 sMCI 0.0181 0.010 1.743 0.082 -0.002 0.038 pMCI 0.0850 0.012 7.050 0.000 0.061 0.109 ============================================================================== Omnibus: 19.646 Durbin-Watson: 1.913 Prob(Omnibus): 0.000 Jarque-Bera (JB): 20.163 Skew: 0.290 Prob(JB): 4.18e-05 Kurtosis: 3.186 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 29.296882 0.0 NaN NaN NaN 1 1297.0 27.144934 3.0 2.151947 34.273746 2.566440e-21 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- AD CN -0.0916 -0.1214 -0.0617 True AD pMCI -0.0172 -0.0503 0.0158 False AD sMCI -0.0752 -0.105 -0.0455 True CN pMCI 0.0743 0.0442 0.1045 True CN sMCI 0.0164 -0.0102 0.0429 False pMCI sMCI -0.058 -0.088 -0.0279 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN 7.6802 0.0 0.0 True AD pMCI 1.1761 0.2401 1.0 False AD sMCI 6.1433 0.0 0.0 True CN pMCI -6.7762 0.0 0.0 True CN sMCI -1.7688 0.0773 0.4639 False pMCI sMCI 5.1066 0.0 0.0 True --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub6 R-squared: 0.014 Model: OLS Adj. R-squared: 0.010 Method: Least Squares F-statistic: 3.685 Date: Sun, 10 Dec 2017 Prob (F-statistic): 0.00258 Time: 20:10:34 Log-Likelihood: 634.63 No. Observations: 1305 AIC: -1257. Df Residuals: 1299 BIC: -1226. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept -0.0294 0.085 -0.345 0.730 -0.197 0.138 mean_gm 0.0275 0.102 0.269 0.788 -0.173 0.228 tiv -6.253e-09 3.37e-08 -0.185 0.853 -7.24e-08 5.99e-08 age_scan 0.0001 0.001 0.212 0.832 -0.001 0.001 gender 0.0003 0.009 0.038 0.970 -0.016 0.017 APOE4_bin 0.0356 0.008 4.282 0.000 0.019 0.052 ============================================================================== Omnibus: 39.494 Durbin-Watson: 1.927 Prob(Omnibus): 0.000 Jarque-Bera (JB): 42.516 Skew: 0.420 Prob(JB): 5.86e-10 Kurtosis: 3.277 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 =========================================== group1 group2 meandiff lower upper reject ------------------------------------------- 0.0 1.0 0.0354 0.0192 0.0516 True ------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 =========================================== group1 group2 stat pval pval_corr reject ------------------------------------------- 0.0 1.0 -4.2882 0.0 0.0 True ------------------------------------------- ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.293 Model: OLS Adj. R-squared: 0.281 Method: Least Squares F-statistic: 25.47 Date: Sun, 10 Dec 2017 Prob (F-statistic): 6.29e-33 Time: 20:10:35 Log-Likelihood: 117.18 No. Observations: 501 AIC: -216.4 Df Residuals: 492 BIC: -178.4 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8409 0.209 4.022 0.000 0.430 1.252 sub6 0.0633 0.067 0.950 0.343 -0.068 0.194 mean_gm -0.1687 0.247 -0.682 0.496 -0.655 0.317 tiv 8.849e-08 7.33e-08 1.207 0.228 -5.55e-08 2.33e-07 age_scan 0.0026 0.001 1.869 0.062 -0.000 0.005 gender -0.0447 0.019 -2.409 0.016 -0.081 -0.008 AD 0.2641 0.027 9.684 0.000 0.211 0.318 sMCI 0.0506 0.021 2.450 0.015 0.010 0.091 pMCI 0.2909 0.030 9.583 0.000 0.231 0.351 ============================================================================== Omnibus: 24.481 Durbin-Watson: 1.907 Prob(Omnibus): 0.000 Jarque-Bera (JB): 27.367 Skew: 0.510 Prob(JB): 1.14e-06 Kurtosis: 3.521 Cond. No. 6.95e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.95e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.374082 1.0 0.033696 0.902262 0.342642 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.251 Model: OLS Adj. R-squared: 0.238 Method: Least Squares F-statistic: 19.30 Date: Sun, 10 Dec 2017 Prob (F-statistic): 4.15e-25 Time: 20:10:35 Log-Likelihood: -2483.6 No. Observations: 470 AIC: 4985. Df Residuals: 461 BIC: 5023. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 228.8076 44.876 5.099 0.000 140.620 316.995 sub6 -48.9878 15.778 -3.105 0.002 -79.994 -17.982 mean_gm -57.3557 60.622 -0.946 0.345 -176.486 61.774 tiv 1.99e-05 1.86e-05 1.069 0.286 -1.67e-05 5.65e-05 age_scan -0.5127 0.340 -1.510 0.132 -1.180 0.155 gender -7.6708 4.704 -1.631 0.104 -16.916 1.574 AD -66.6136 6.852 -9.722 0.000 -80.079 -53.148 sMCI -30.2539 5.754 -5.258 0.000 -41.561 -18.947 pMCI -53.5007 6.914 -7.738 0.000 -67.088 -39.913 ============================================================================== Omnibus: 18.845 Durbin-Watson: 2.070 Prob(Omnibus): 0.000 Jarque-Bera (JB): 20.055 Skew: 0.499 Prob(JB): 4.42e-05 Kurtosis: 3.172 Cond. No. 6.08e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.08e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.070129e+06 1.0 22376.835295 9.639698 0.002021 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.183 Model: OLS Adj. R-squared: 0.169 Method: Least Squares F-statistic: 12.58 Date: Sun, 10 Dec 2017 Prob (F-statistic): 2.46e-16 Time: 20:10:36 Log-Likelihood: -2440.4 No. Observations: 457 AIC: 4899. Df Residuals: 448 BIC: 4936. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 31.9030 47.961 0.665 0.506 -62.353 126.159 sub6 2.0698 16.893 0.123 0.903 -31.129 35.268 mean_gm 42.0489 65.841 0.639 0.523 -87.346 171.444 tiv 1.15e-06 1.99e-05 0.058 0.954 -3.8e-05 4.03e-05 age_scan 0.2993 0.363 0.825 0.410 -0.414 1.012 gender -14.3620 5.076 -2.829 0.005 -24.337 -4.387 AD 61.5936 7.337 8.395 0.000 47.175 76.012 sMCI 23.0554 6.190 3.725 0.000 10.891 35.220 pMCI 44.5350 7.414 6.007 0.000 29.965 59.105 ============================================================================== Omnibus: 250.629 Durbin-Watson: 1.893 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2458.577 Skew: 2.176 Prob(JB): 0.00 Kurtosis: 13.496 Cond. No. 6.14e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.14e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.163322e+06 1.0 38.983983 0.015013 0.902537 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.175 Model: OLS Adj. R-squared: 0.172 Method: Least Squares F-statistic: 55.12 Date: Sun, 10 Dec 2017 Prob (F-statistic): 4.98e-52 Time: 20:10:37 Log-Likelihood: -3006.4 No. Observations: 1305 AIC: 6025. Df Residuals: 1299 BIC: 6056. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.7064 1.379 15.735 0.000 19.000 24.413 sub6 -4.1453 0.449 -9.241 0.000 -5.025 -3.265 mean_gm 21.4355 1.658 12.928 0.000 18.183 24.688 tiv -2.373e-06 5.49e-07 -4.323 0.000 -3.45e-06 -1.3e-06 age_scan 0.0146 0.010 1.394 0.164 -0.006 0.035 gender 0.3377 0.139 2.433 0.015 0.065 0.610 ============================================================================== Omnibus: 113.293 Durbin-Watson: 1.921 Prob(Omnibus): 0.000 Jarque-Bera (JB): 141.660 Skew: -0.781 Prob(JB): 1.73e-31 Kurtosis: 3.407 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.840950 0.0 NaN NaN NaN 1 1299.0 7658.418455 1.0 503.422495 85.389147 9.704955e-20
get_subtype_results(sub_img, 7, adni_df)
Running analyses for subtype 7 ....
############################################################ GLM results for effect of diagnosis on subtype weight ############################################################
OLS Regression Results ============================================================================== Dep. Variable: sub7 R-squared: 0.079 Model: OLS Adj. R-squared: 0.074 Method: Least Squares F-statistic: 15.98 Date: Sun, 10 Dec 2017 Prob (F-statistic): 3.04e-20 Time: 20:10:44 Log-Likelihood: 936.75 No. Observations: 1305 AIC: -1858. Df Residuals: 1297 BIC: -1816. Df Model: 7 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.1836 0.069 2.662 0.008 0.048 0.319 mean_gm -0.3836 0.087 -4.385 0.000 -0.555 -0.212 tiv 3.257e-08 2.71e-08 1.200 0.230 -2.07e-08 8.58e-08 age_scan -0.0007 0.001 -1.369 0.171 -0.002 0.000 gender -0.0040 0.007 -0.588 0.556 -0.017 0.009 AD -0.0841 0.010 -8.339 0.000 -0.104 -0.064 sMCI -0.0056 0.008 -0.656 0.512 -0.022 0.011 pMCI -0.0733 0.010 -7.427 0.000 -0.093 -0.054 ============================================================================== Omnibus: 2.718 Durbin-Watson: 2.034 Prob(Omnibus): 0.257 Jarque-Bera (JB): 2.448 Skew: -0.027 Prob(JB): 0.294 Kurtosis: 2.795 Cond. No. 6.06e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.06e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 19.739466 0.0 NaN NaN NaN 1 1297.0 18.182247 3.0 1.557218 37.027179 5.854154e-23 ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- AD CN 0.0686 0.0441 0.0931 True AD pMCI 0.0054 -0.0217 0.0325 False AD sMCI 0.0647 0.0403 0.0891 True CN pMCI -0.0632 -0.088 -0.0385 True CN sMCI -0.0039 -0.0257 0.0179 False pMCI sMCI 0.0593 0.0347 0.084 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.01, alphacBonf=0.008 ============================================= group1 group2 stat pval pval_corr reject --------------------------------------------- AD CN -6.9496 0.0 0.0 True AD pMCI -0.4753 0.6348 1.0 False AD sMCI -6.7659 0.0 0.0 True CN pMCI 6.6326 0.0 0.0 True CN sMCI 0.4895 0.6246 1.0 False pMCI sMCI -6.44 0.0 0.0 True --------------------------------------------- ############################################################ GLM results for effect of APOE4 ############################################################
/Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less return (self.a < x) & (x < self.b) /Users/AngelaTam/anaconda3/lib/python3.5/site-packages/scipy/stats/_distn_infrastructure.py:1818: RuntimeWarning: invalid value encountered in less_equal cond2 = cond0 & (x <= self.a)
OLS Regression Results ============================================================================== Dep. Variable: sub7 R-squared: 0.022 Model: OLS Adj. R-squared: 0.018 Method: Least Squares F-statistic: 5.773 Date: Sun, 10 Dec 2017 Prob (F-statistic): 2.80e-05 Time: 20:10:47 Log-Likelihood: 897.12 No. Observations: 1305 AIC: -1782. Df Residuals: 1299 BIC: -1751. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.0859 0.070 1.231 0.218 -0.051 0.223 mean_gm -0.0696 0.083 -0.834 0.405 -0.233 0.094 tiv -6.722e-09 2.76e-08 -0.244 0.808 -6.09e-08 4.74e-08 age_scan -0.0003 0.001 -0.640 0.523 -0.001 0.001 gender 0.0005 0.007 0.069 0.945 -0.013 0.014 APOE4_bin -0.0361 0.007 -5.304 0.000 -0.049 -0.023 ============================================================================== Omnibus: 1.601 Durbin-Watson: 2.027 Prob(Omnibus): 0.449 Jarque-Bera (JB): 1.657 Skew: -0.063 Prob(JB): 0.437 Kurtosis: 2.880 Cond. No. 5.65e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.65e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ Pairwise post hoc t-tests between groups ############################################################ Multiple Comparison of Means - Tukey HSD,FWER=0.05 ============================================= group1 group2 meandiff lower upper reject --------------------------------------------- 0.0 1.0 -0.0355 -0.0488 -0.0223 True --------------------------------------------- Test Multiple Comparison ttest_ind FWER=0.05 method=bonf alphacSidak=0.05, alphacBonf=0.050 ========================================== group1 group2 stat pval pval_corr reject ------------------------------------------ 0.0 1.0 5.2594 0.0 0.0 True ------------------------------------------ ############################################################ GLM results for effect of subtype weight on amyloid (AV45) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: AV45 R-squared: 0.297 Model: OLS Adj. R-squared: 0.285 Method: Least Squares F-statistic: 25.96 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.66e-33 Time: 20:10:48 Log-Likelihood: 118.58 No. Observations: 501 AIC: -219.2 Df Residuals: 492 BIC: -181.2 Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 0.8597 0.209 4.122 0.000 0.450 1.270 sub7 -0.1574 0.082 -1.914 0.056 -0.319 0.004 mean_gm -0.1843 0.247 -0.747 0.455 -0.669 0.300 tiv 8.294e-08 7.32e-08 1.134 0.257 -6.08e-08 2.27e-07 age_scan 0.0026 0.001 1.875 0.061 -0.000 0.005 gender -0.0455 0.019 -2.458 0.014 -0.082 -0.009 AD 0.2622 0.027 9.640 0.000 0.209 0.316 sMCI 0.0514 0.021 2.495 0.013 0.011 0.092 pMCI 0.2820 0.031 9.180 0.000 0.222 0.342 ============================================================================== Omnibus: 24.574 Durbin-Watson: 1.905 Prob(Omnibus): 0.000 Jarque-Bera (JB): 27.368 Skew: 0.515 Prob(JB): 1.14e-06 Kurtosis: 3.502 Cond. No. 6.95e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.95e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 493.0 18.407777 0.0 NaN NaN NaN 1 492.0 18.271683 1.0 0.136094 3.664586 0.05616 ############################################################ GLM results for effect of subtype weight on amyloid (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: ABETA R-squared: 0.254 Model: OLS Adj. R-squared: 0.241 Method: Least Squares F-statistic: 19.63 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.60e-25 Time: 20:10:49 Log-Likelihood: -2482.6 No. Observations: 470 AIC: 4983. Df Residuals: 461 BIC: 5021. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 222.4884 44.846 4.961 0.000 134.360 310.617 sub7 67.1601 19.664 3.415 0.001 28.518 105.802 mean_gm -25.4384 60.996 -0.417 0.677 -145.304 94.427 tiv 1.634e-05 1.86e-05 0.879 0.380 -2.02e-05 5.29e-05 age_scan -0.5354 0.339 -1.580 0.115 -1.201 0.130 gender -6.5009 4.692 -1.385 0.167 -15.722 2.720 AD -63.6566 6.979 -9.122 0.000 -77.370 -49.943 sMCI -28.9148 5.746 -5.032 0.000 -40.206 -17.624 pMCI -52.2385 6.949 -7.518 0.000 -65.893 -38.584 ============================================================================== Omnibus: 17.122 Durbin-Watson: 2.030 Prob(Omnibus): 0.000 Jarque-Bera (JB): 18.009 Skew: 0.471 Prob(JB): 0.000123 Kurtosis: 3.183 Cond. No. 6.14e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.14e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 462.0 1.092506e+06 0.0 NaN NaN NaN 1 461.0 1.065544e+06 1.0 26962.232832 11.665021 0.000693 ############################################################ GLM results for effect of subtype weight on tau (CSF) ############################################################
OLS Regression Results ============================================================================== Dep. Variable: TAU R-squared: 0.195 Model: OLS Adj. R-squared: 0.181 Method: Least Squares F-statistic: 13.58 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.15e-17 Time: 20:10:50 Log-Likelihood: -2437.1 No. Observations: 457 AIC: 4892. Df Residuals: 448 BIC: 4929. Df Model: 8 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 39.6434 47.698 0.831 0.406 -54.095 133.382 sub7 -54.0831 21.122 -2.560 0.011 -95.594 -12.572 mean_gm 18.1270 66.021 0.275 0.784 -111.623 147.877 tiv 3.222e-06 1.98e-05 0.163 0.871 -3.57e-05 4.21e-05 age_scan 0.3037 0.360 0.843 0.400 -0.404 1.011 gender -14.8652 5.039 -2.950 0.003 -24.768 -4.962 AD 57.2799 7.427 7.712 0.000 42.684 71.876 sMCI 22.2654 6.151 3.620 0.000 10.178 34.353 pMCI 40.6755 7.418 5.484 0.000 26.098 55.253 ============================================================================== Omnibus: 251.552 Durbin-Watson: 1.873 Prob(Omnibus): 0.000 Jarque-Bera (JB): 2458.502 Skew: 2.189 Prob(JB): 0.00 Kurtosis: 13.486 Cond. No. 6.21e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 6.21e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 449.0 1.163361e+06 0.0 NaN NaN NaN 1 448.0 1.146582e+06 1.0 16779.240859 6.556094 0.010779 ############################################################ GLM results for effect of subtype weight on MMSE ############################################################
OLS Regression Results ============================================================================== Dep. Variable: MMSE_bl R-squared: 0.183 Model: OLS Adj. R-squared: 0.179 Method: Least Squares F-statistic: 58.02 Date: Sun, 10 Dec 2017 Prob (F-statistic): 1.35e-54 Time: 20:10:51 Log-Likelihood: -3000.4 No. Observations: 1305 AIC: 6013. Df Residuals: 1299 BIC: 6044. Df Model: 5 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ Intercept 21.4208 1.373 15.598 0.000 18.727 24.115 sub7 5.3901 0.544 9.908 0.000 4.323 6.457 mean_gm 21.6581 1.651 13.121 0.000 18.420 24.896 tiv -2.305e-06 5.47e-07 -4.217 0.000 -3.38e-06 -1.23e-06 age_scan 0.0154 0.010 1.482 0.139 -0.005 0.036 gender 0.3343 0.138 2.419 0.016 0.063 0.605 ============================================================================== Omnibus: 112.603 Durbin-Watson: 1.937 Prob(Omnibus): 0.000 Jarque-Bera (JB): 140.600 Skew: -0.778 Prob(JB): 2.95e-31 Kurtosis: 3.405 Cond. No. 5.63e+07 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 5.63e+07. This might indicate that there are strong multicollinearity or other numerical problems. ############################################################ F test on full and reduced model: ############################################################ df_resid ssr df_diff ss_diff F Pr(>F) 0 1300.0 8161.840950 0.0 NaN NaN NaN 1 1299.0 7588.353056 1.0 573.487894 98.171602 2.327045e-22