## Stratified by status
## HIVneg Pos_UnCon
## n 227 81
## participant_age (mean (sd)) 40.59 (18.91) 37.74 (16.81)
## gender_check = 1 (%) 122 ( 53.7) 14 ( 17.3)
## bmi (mean (sd)) 26.73 (5.93) 25.70 (6.29)
## nadir_cd4 (mean (sd)) NaN (NA) 248.39 (203.47)
## recent_cd4 (mean (sd)) NaN (NA) 420.69 (311.15)
## recent_cd8 (mean (sd)) NaN (NA) 1034.83 (377.48)
## status (%)
## HIVneg 227 (100.0) 0 ( 0.0)
## Pos_UnCon 0 ( 0.0) 81 (100.0)
## Pos_Con 0 ( 0.0) 0 ( 0.0)
## Stratified by status
## Pos_Con p test
## n 202
## participant_age (mean (sd)) 46.95 (15.45) <0.001
## gender_check = 1 (%) 47 ( 23.3) <0.001
## bmi (mean (sd)) 26.35 (5.65) 0.415
## nadir_cd4 (mean (sd)) 234.15 (191.38) 0.624
## recent_cd4 (mean (sd)) 638.58 (287.27) <0.001
## recent_cd8 (mean (sd)) 909.09 (420.46) 0.481
## status (%) <0.001
## HIVneg 0 ( 0.0)
## Pos_UnCon 0 ( 0.0)
## Pos_Con 202 (100.0)
As in the other analysis, I first regressed out the effects of age and sex since our cohorts are so poorly matched. Then I Z-transformed the Pearson correlation coefficients.
#Regress out age and sex effect
coef.fcn = function(REGION) {
coeffs = coef(lm(REGION ~ participant_age + gender_check, data=df))
return(data.frame(Intercept=coeffs[1], Slope=coeffs[2], Gender=coeffs[3]))
}
AdjustForAge<-function(REGION){
Slope<-coef.fcn(REGION)
AdjustedREGION<-REGION-df$participant_age*Slope[,2]
AdjustedREGION<-AdjustedREGION-as.numeric(as.character(df$gender_check))*Slope[,3]
return(AdjustedREGION)}
df[,9:99]<-data.frame(apply(df[,9:99], 2, AdjustForAge))
df[9:99]<-apply(df[,9:99], 2, function(x) scale(x, center = TRUE, scale = TRUE))
I pretty much copied the analysis laid out in Anderson & Cohen, 2013 (https://www.frontiersin.org/articles/10.3389/fnhum.2013.00520/full).
After I obtained the graph theory metrics following their methods, I compared these metrics by HIV status using anova followed by Tukey HSD tests. I did not correct for any covariates since I performed that correction earlier. You can see that there’s not much going on here, although it does appear that there may be some distinction made by Edge Connectivity.
## Metric Overallp LevelComp p_adj
## 1 AveragePathLength 0.93546809 Pos_Con-HIVneg 0.93087867
## 2 AveragePathLength 0.93546809 Pos_Con-HIVneg 0.99716413
## 3 AveragePathLength 0.93546809 Pos_Con-HIVneg 0.97935821
## 4 CliqueNumber 0.57030917 Pos_Con-HIVneg 0.63676862
## 5 CliqueNumber 0.57030917 Pos_Con-HIVneg 0.68170949
## 6 CliqueNumber 0.57030917 Pos_Con-HIVneg 0.98684449
## 7 GraphDensity 0.76508522 Pos_Con-HIVneg 0.89271542
## 8 GraphDensity 0.76508522 Pos_Con-HIVneg 0.76517692
## 9 GraphDensity 0.76508522 Pos_Con-HIVneg 0.93384203
## 10 EdgeConnectivity 0.03581061 Pos_Con-HIVneg 0.04801043
## 11 EdgeConnectivity 0.03581061 Pos_Con-HIVneg 0.16559702
## 12 EdgeConnectivity 0.03581061 Pos_Con-HIVneg 0.99884839
## 13 MedianCloseness 0.76853568 Pos_Con-HIVneg 0.84309809
## 14 MedianCloseness 0.76853568 Pos_Con-HIVneg 0.96872519
## 15 MedianCloseness 0.76853568 Pos_Con-HIVneg 0.79489428
## 16 MedianGraphCoreness 0.74019221 Pos_Con-HIVneg 0.85557153
## 17 MedianGraphCoreness 0.74019221 Pos_Con-HIVneg 0.75424180
## 18 MedianGraphCoreness 0.74019221 Pos_Con-HIVneg 0.94741180
## 19 MaxDegree 0.75251106 Pos_Con-HIVneg 0.99733041
## 20 MaxDegree 0.75251106 Pos_Con-HIVneg 0.77609610
## 21 MaxDegree 0.75251106 Pos_Con-HIVneg 0.75236396
## 22 MedianDegree 0.26337800 Pos_Con-HIVneg 0.93237032
## 23 MedianDegree 0.26337800 Pos_Con-HIVneg 0.23823046
## 24 MedianDegree 0.26337800 Pos_Con-HIVneg 0.37817249
## 25 MinDegree 0.03581061 Pos_Con-HIVneg 0.04801043
## 26 MinDegree 0.03581061 Pos_Con-HIVneg 0.16559702
## 27 MinDegree 0.03581061 Pos_Con-HIVneg 0.99884839
## 28 VertexCount 0.46823337 Pos_Con-HIVneg 0.56963711
## 29 VertexCount 0.46823337 Pos_Con-HIVneg 1.00000000
## 30 VertexCount 0.46823337 Pos_Con-HIVneg 0.73722905
## 31 EdgeCount 0.76508522 Pos_Con-HIVneg 0.89271542
## 32 EdgeCount 0.76508522 Pos_Con-HIVneg 0.76517692
## 33 EdgeCount 0.76508522 Pos_Con-HIVneg 0.93384203
## 34 Transitivity 0.97345866 Pos_Con-HIVneg 0.97081257
## 35 Transitivity 0.97345866 Pos_Con-HIVneg 0.99562897
## 36 Transitivity 0.97345866 Pos_Con-HIVneg 0.99623022
Normality is not an appropriate assumption for edge connectivity, though. You can see that by looking at its density plot. A chi-square test shows a trend to suggest that HIV+ individuals have more edge connectivity than controls. This suggests that they have slightly less specific connectivity; however, this is all pretty weak.
##
## Pearson's Chi-squared test
##
## data: table(df.results$EdgeConnectivity, df.results$status)
## X-squared = 8.457, df = 4, p-value = 0.0762