Summary of models and ROIs 04/20/2018

PPI model is activity (how + why + risk) messages vs rest, which paralells the model used in other papers on this dataset

Seed ROIs

plotting.plot_roi('/fmriDataRaw/fmri_data_raw/DSI_test/AAL626_regions/AAL626_final_195.nii')
png

png

plotting.plot_roi('/fmriDataRaw/fmri_data_raw/DSI_test/AAL626_regions/AAL626_final_198.nii')
<nilearn.plotting.displays.OrthoSlicer at 0x7ff4e9aeb9b0>
png

png

plotting.plot_roi('/fmriDataRaw/fmri_data_raw/DSI_test/AAL626_regions/AAL626_final_200.nii')
<nilearn.plotting.displays.OrthoSlicer at 0x7ff4e98a7c88>
png

png

plotting.plot_roi('/fmriDataRaw/fmri_data_raw/DSI_test/AAL626_regions/AAL626_final_202.nii')
<nilearn.plotting.displays.OrthoSlicer at 0x7ff4e9665f60>
png

png

Predicting sedentary change

ROI 195, sedentary

stepAIC reduced model does not contain PPI terms

ROI 198, sedentary

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_198_sed_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.183366 -0.042460  0.004484  0.037281  0.253873 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.03025    0.01503   2.013  0.04591 * 
## sed_percent.pre        -0.12422    0.04907  -2.531  0.01240 * 
## PPI_Activity3vRest_199 -0.50332    0.28135  -1.789  0.07566 . 
## PPI_Activity3vRest_237  0.45938    0.25741   1.785  0.07635 . 
## PPI_Activity3vRest_286 -0.28910    0.14168  -2.041  0.04306 * 
## PPI_Activity3vRest_74  -1.17379    0.44168  -2.658  0.00873 **
## PPI_Activity3vRest_76   0.47387    0.21816   2.172  0.03143 * 
## PPI_Activity3vRest_79   0.73160    0.22579   3.240  0.00147 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07062 on 149 degrees of freedom
## Multiple R-squared:  0.1208, Adjusted R-squared:  0.07953 
## F-statistic: 2.926 on 7 and 149 DF,  p-value: 0.006742

Reduced model with PPI terms only: cross validation permutation test p<0.01

roilist=[199, 237, 286, 74, 76, 79]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.ZSlicer at 0x7ff4f1a39be0>
png

png

plotting.plot_prob_atlas(roi_imgs, display_mode='y')
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.YSlicer at 0x7ff4f20192e8>
png

png

ROI 200, sedentary

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_200_sed_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.196406 -0.041736  0.006236  0.035315  0.244112 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.03808    0.01504   2.531  0.01238 * 
## sed_percent.pre        -0.14100    0.04912  -2.871  0.00468 **
## PPI_Activity3vRest_282 -0.40224    0.20578  -1.955  0.05246 . 
## PPI_Activity3vRest_77  -0.53110    0.35285  -1.505  0.13435   
## PPI_Activity3vRest_78   0.46916    0.24710   1.899  0.05950 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07178 on 152 degrees of freedom
## Multiple R-squared:  0.07342,    Adjusted R-squared:  0.04904 
## F-statistic: 3.011 on 4 and 152 DF,  p-value: 0.02001

Reduced model with PPI terms only: cross validation permutation test p<0.007

roilist=[282, 77, 78]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.ZSlicer at 0x7ff4f1467c88>
png

png

ROI 202, sedentary

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_202_sed_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.22460 -0.03859  0.00778  0.03234  0.27505 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.03432    0.01454   2.359  0.01958 * 
## sed_percent.pre        -0.14477    0.04862  -2.977  0.00339 **
## PPI_Activity3vRest_282 -0.93828    0.32537  -2.884  0.00450 **
## PPI_Activity3vRest_314  0.84448    0.34085   2.478  0.01433 * 
## PPI_Activity3vRest_81   0.78944    0.39604   1.993  0.04802 * 
## PPI_Activity3vRest_84  -0.73622    0.33194  -2.218  0.02805 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.07111 on 151 degrees of freedom
## Multiple R-squared:  0.09683,    Adjusted R-squared:  0.06693 
## F-statistic: 3.238 on 5 and 151 DF,  p-value: 0.008322

Reduced model with PPI terms only: cross validation permutation test p<0.003

roilist=[282, 314,81,84]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.ZSlicer at 0x7ff4f0f3c7f0>
png

png

282 is the only ROI to come up in more than one list

plotting.plot_roi('/fmriDataRaw/fmri_data_raw/DSI_test/AAL626_regions/AAL626_final_282.nii')
<nilearn.plotting.displays.OrthoSlicer at 0x7ff4f84657b8>
png

png

Predicting mod-vig change

ROI 195, mod-vig

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_195_mod_vig_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.142547 -0.013117 -0.001390  0.009999  0.141488 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.006545   0.004388   1.491  0.13799   
## mod_vig_percent.pre    -0.117074   0.039456  -2.967  0.00351 **
## PPI_Activity3vRest_120 -0.312621   0.140724  -2.222  0.02783 * 
## PPI_Activity3vRest_14   0.283913   0.167665   1.693  0.09250 . 
## PPI_Activity3vRest_38   0.544645   0.226099   2.409  0.01723 * 
## PPI_Activity3vRest_39   0.195317   0.109822   1.778  0.07738 . 
## PPI_Activity3vRest_40  -0.579294   0.193129  -3.000  0.00317 **
## PPI_Activity3vRest_500 -0.250967   0.122969  -2.041  0.04304 * 
## PPI_Activity3vRest_22   0.254425   0.181387   1.403  0.16281   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02815 on 148 degrees of freedom
## Multiple R-squared:  0.1584, Adjusted R-squared:  0.1129 
## F-statistic: 3.483 on 8 and 148 DF,  p-value: 0.001036

Reduced model with PPI terms only: cross validation permutation test p<0.082

roilist=[14,22,38,39,40,120,500]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.ZSlicer at 0x7ff4f0a9a908>
png

png

plotting.plot_prob_atlas(roi_imgs, display_mode='x',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.XSlicer at 0x7ff4ef875be0>
png

png

ROI 198, mod-vig

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_198_mod_vig_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.120115 -0.014638 -0.001259  0.012689  0.137839 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.007314   0.004527   1.616  0.10830   
## mod_vig_percent.pre    -0.110556   0.039109  -2.827  0.00536 **
## PPI_Activity3vRest_14   0.356184   0.145044   2.456  0.01523 * 
## PPI_Activity3vRest_222 -0.378174   0.177486  -2.131  0.03478 * 
## PPI_Activity3vRest_286 -0.158358   0.059740  -2.651  0.00891 **
## PPI_Activity3vRest_75   0.206694   0.151147   1.368  0.17355   
## PPI_Activity3vRest_76  -0.162647   0.077993  -2.085  0.03876 * 
## PPI_Activity3vRest_79   0.229619   0.114396   2.007  0.04656 * 
## PPI_Activity3vRest_80  -0.163493   0.118073  -1.385  0.16825   
## PPI_Activity3vRest_85   0.199955   0.089487   2.234  0.02696 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02835 on 147 degrees of freedom
## Multiple R-squared:  0.152,  Adjusted R-squared:  0.1001 
## F-statistic: 2.928 on 9 and 147 DF,  p-value: 0.003196

Reduced model with PPI terms only: cross validation permutation test p<0.6

roilist=[14,75, 76, 79, 80, 85, 222, 286]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.ZSlicer at 0x7ff4ef3b3828>
png

png

plotting.plot_prob_atlas(roi_imgs, display_mode='x',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.XSlicer at 0x7ff4ee4cb6d8>
png

png

ROI 14 shows up twice

png

png

ROI 200, mod-vig

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_200_mod_vig_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.132272 -0.014836 -0.000654  0.013342  0.174073 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.007532   0.004607   1.635  0.10412   
## mod_vig_percent.pre    -0.106999   0.038945  -2.747  0.00674 **
## PPI_Activity3vRest_275 -0.104700   0.076499  -1.369  0.17314   
## PPI_Activity3vRest_302  0.219988   0.081248   2.708  0.00756 **
## PPI_Activity3vRest_68  -0.397021   0.164331  -2.416  0.01689 * 
## PPI_Activity3vRest_77   0.212676   0.095442   2.228  0.02734 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02853 on 151 degrees of freedom
## Multiple R-squared:  0.118,  Adjusted R-squared:  0.08876 
## F-statistic: 4.039 on 5 and 151 DF,  p-value: 0.00181

Reduced model with PPI terms only: cross validation permutation test p<0.004

roilist=[275,302,68,77]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.ZSlicer at 0x7ff4ee007ef0>
png

png

plotting.plot_prob_atlas(roi_imgs, display_mode='x',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)





<nilearn.plotting.displays.XSlicer at 0x7ff4edb60588>
png

png

ROI 202, mod-vig

summary(readRDS('~/Desktop/PA2 SF files/ReducedModel_202_mod_vig_percent.rds'))
## 
## Call:
## lm(formula = formula(PPIFormula), data = mydata)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.141385 -0.014144 -0.000863  0.012390  0.104721 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             0.007291   0.004069   1.792 0.075322 .  
## mod_vig_percent.pre    -0.122422   0.035693  -3.430 0.000791 ***
## PPI_Activity3vRest_240  0.562694   0.156458   3.596 0.000444 ***
## PPI_Activity3vRest_245 -0.595136   0.150973  -3.942 0.000126 ***
## PPI_Activity3vRest_253 -0.408683   0.143412  -2.850 0.005028 ** 
## PPI_Activity3vRest_286 -0.366784   0.131932  -2.780 0.006171 ** 
## PPI_Activity3vRest_289 -0.217004   0.107166  -2.025 0.044749 *  
## PPI_Activity3vRest_297  0.210767   0.127281   1.656 0.099947 .  
## PPI_Activity3vRest_305  0.591037   0.209914   2.816 0.005561 ** 
## PPI_Activity3vRest_307  0.199752   0.068995   2.895 0.004389 ** 
## PPI_Activity3vRest_49  -0.256303   0.136074  -1.884 0.061670 .  
## PPI_Activity3vRest_81   0.600233   0.131965   4.548 1.15e-05 ***
## PPI_Activity3vRest_93  -0.386691   0.148681  -2.601 0.010285 *  
## PPI_Activity3vRest_95   0.366534   0.216826   1.690 0.093136 .  
## PPI_Activity3vRest_97   0.121129   0.080231   1.510 0.133330    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02549 on 142 degrees of freedom
## Multiple R-squared:  0.338,  Adjusted R-squared:  0.2727 
## F-statistic: 5.178 on 14 and 142 DF,  p-value: 8.04e-08

Reduced model with PPI terms only: cross validation permutation test p<0.0001

roilist=[240,245,253,286,289,297,205,307,49,81,93,95,97]
roipathlist=[roidir+'AAL626_final_'+str(x)+'.nii' for x in roilist]
roi_imgs = image.concat_imgs(roipathlist)
plotting.plot_prob_atlas(roi_imgs, display_mode='z',colorbar=True)
/usr/local/anaconda3/lib/python3.6/site-packages/numpy/ma/core.py:2766: UserWarning: Warning: converting a masked element to nan.
  order=order, subok=True, ndmin=ndmin)
/usr/local/anaconda3/lib/python3.6/site-packages/matplotlib/contour.py:920: UserWarning: linewidths is ignored by contourf
  warnings.warn('linewidths is ignored by contourf')





<nilearn.plotting.displays.ZSlicer at 0x7ff4ed681978>
png

png

plotting.plot_prob_atlas(roi_imgs, display_mode='x',colorbar=True)
---------------------------------------------------------------------------

NameError                                 Traceback (most recent call last)

<ipython-input-1-9e95a262559a> in <module>()
----> 1 plotting.plot_prob_atlas(roi_imgs, display_mode='x',colorbar=True)


NameError: name 'plotting' is not defined