Re-organizing dataframe variables

KP_df<-readr::read_csv("./batchcontrol_newdf_20210916.csv")
## 
## -- Column specification --------------------------------------------------------
## cols(
##   .default = col_double(),
##   group = col_character()
## )
## i Use `spec()` for the full column specifications.
demo_group_vars<-c( "group", 
                    "sex_male", 
                    "race_white", 
                    "age", 
                    "bmi" )

med_vars<-c("fluoxetine",
            "escitalopram", 
            "hydroxyzine",
            "trazodone", 
            "aripiprazole", 
            "venlafaxine" ,
            "lamotrigine" ,
            "lithium", 
            "bupropion", 
            "suboxone")


SUD_vars = c("alcohol_30days", 
             "amphetamines.stims.uppers_30days",
             "cocaine.crack_30days",
             "otc.meds_30days",
             "heroine.morphine.opiates_30days", 
             "presx.painkillers_30days",
             "barbituates_30days",
             "tranquilizers_30days", 
             "lsd.hallucinogens_30days", 
             "ecstasy_30days",  
             "marijuana_30days", 
             "smoke.tobacco_30days",
             "chew.tobacco_30days")

KP_data<-c("ido1",
           "ido2",
           "tdo2",
           "kmo",
           "kynu",
           "afmid",
           "aadat",
           "ccbl1",
           "ccbl2",
           "got2",
           "haao",
           "acmsd")

psychometric_vars<-c( "phq15_tot",               
                      "gad_tot",                         
                       "phq_tot",                     
                      "bhs_tot",                       
                      "ctq_physical_tot",                
                       "ctq_sexual_tot" ,               
                      "ctq_tot",                        
                      "pcl_tot" ,                        
                       "bps_tot",                     
                      "als_tot" ,                    
                      "apathy_tot"  ,                    
                       "rfl_tot"  ,                    
                      "dusib_tot",                    
                      "asiq_tot"   ,                     
                      "bis_tot"  ,                    
                      "mspss_tot"  ,                  
                      "srrs_tot",                        
                       "pss_tot"  ,                     
                      "shaps_tot" ,                     
                      "asr_total",
                      "crs")

diagnosis_vars<-c( "scid_ehr_mood_disorder"   , 
                   "scid_ehr_psychotic"       ,     
                   "scid_ehr_aud_sud" ,  
                   "scid_ehr_anxiety" ,       
                   "scid_ehr_ptsd")  


df<-KP_df %>% dplyr::select(all_of(demo_group_vars),
                            all_of(diagnosis_vars), 
                            all_of(med_vars),
                            all_of(SUD_vars),
                            all_of(psychometric_vars),
                            all_of(KP_data))

df[c("group", "sex_male","race_white")]<-lapply(df[c("group", "sex_male","race_white")], as.factor)
df[diagnosis_vars]<-lapply(df[diagnosis_vars], as.factor)
df[SUD_vars]<-lapply(df[SUD_vars], as.factor)
df$group<-relevel(df$group, ref="HC")
df$phq_severe<-ifelse(df$phq_tot>=15, 1, 0)

Note: “group” variable is coded as unordered factor with HC as reference group (assumption - not ordinal)

Sample description by variable

## 
## --------Summary descriptives table ---------
## 
## ________________________________________________ 
##                                     [ALL]     N  
##                                     N=152        
## ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 
## group:                                       148 
##     HC                           32 (21.6%)      
##     PC                           23 (15.5%)      
##     SA                           45 (30.4%)      
##     SI                           48 (32.4%)      
## sex_male                         68 (51.5%)  132 
## race_white                       101 (76.5%) 132 
## age                              24.3 (3.79) 132 
## bmi                              25.6 (5.77) 114 
## scid_ehr_mood_disorder           101 (67.3%) 150 
## scid_ehr_psychotic               11 (7.33%)  150 
## scid_ehr_aud_sud                 62 (41.3%)  150 
## scid_ehr_anxiety                 49 (32.7%)  150 
## scid_ehr_ptsd                    32 (21.3%)  150 
## fluoxetine                       0.23 (0.42) 111 
## escitalopram                     0.18 (0.39) 111 
## hydroxyzine                      0.15 (0.36) 111 
## trazodone                        0.15 (0.36) 111 
## aripiprazole                     0.09 (0.29) 111 
## venlafaxine                      0.08 (0.27) 111 
## lamotrigine                      0.09 (0.29) 111 
## lithium                          0.09 (0.29) 111 
## bupropion                        0.05 (0.21) 111 
## suboxone                         0.05 (0.21) 111 
## alcohol_30days                   108 (76.6%) 141 
## amphetamines.stims.uppers_30days 11 (7.86%)  140 
## cocaine.crack_30days             20 (14.2%)  141 
## otc.meds_30days                  47 (33.6%)  140 
## heroine.morphine.opiates_30days  18 (12.9%)  140 
## presx.painkillers_30days         15 (10.7%)  140 
## barbituates_30days                5 (3.57%)  140 
## tranquilizers_30days              4 (2.86%)  140 
## lsd.hallucinogens_30days          4 (2.84%)  141 
## ecstasy_30days                    8 (5.71%)  140 
## marijuana_30days                 72 (51.4%)  140 
## smoke.tobacco_30days             58 (41.4%)  140 
## chew.tobacco_30days              11 (7.86%)  140 
## phq15_tot                        7.77 (5.82) 148 
## gad_tot                          9.21 (6.67) 148 
## phq_tot                          12.2 (8.73) 148 
## bhs_tot                          9.86 (2.51) 148 
## ctq_physical_tot                 8.01 (4.08) 147 
## ctq_sexual_tot                   7.55 (5.44) 146 
## ctq_tot                          58.9 (10.3) 147 
## pcl_tot                          32.1 (23.3) 136 
## bps_tot                          0.48 (0.16) 143 
## als_tot                          1.29 (0.87) 142 
## apathy_tot                       38.8 (8.61) 129 
## rfl_tot                          173 (42.7)  139 
## dusib_tot                        33.2 (33.4) 141 
## asiq_tot                         57.1 (49.5) 148 
## bis_tot                          65.6 (14.8) 127 
## mspss_tot                        5.28 (1.42) 129 
## srrs_tot                         11.4 (7.30) 129 
## pss_tot                          22.1 (10.4) 128 
## shaps_tot                        3.21 (3.05) 128 
## asr_total                        81.1 (49.3) 139 
## crs                              2.68 (1.30) 123 
## ido1                             5.35 (1.29) 152 
## ido2                             3.93 (0.40) 152 
## tdo2                             5.21 (0.60) 152 
## kmo                              6.20 (0.83) 152 
## kynu                             5.91 (1.00) 152 
## afmid                            3.64 (0.61) 152 
## aadat                            3.37 (0.51) 152 
## ccbl1                            6.17 (0.64) 152 
## ccbl2                            8.41 (0.57) 152 
## got2                             8.13 (0.63) 152 
## haao                             4.72 (0.70) 152 
## acmsd                            5.92 (0.42) 152 
## phq_severe                       0.49 (0.50) 148 
## ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Visual inspection: normality of residuals (note: individual biomarkers modelled by demo + group)

vars_KP<-df %>% dplyr::select(all_of(KP_data)) %>% names()

for (x in vars_KP) {
  LM1 <-  lm(substitute(i ~ sex_male+age+bmi+race_white+group, list(i = as.name(x))), data = df)
  graphics::plot(LM1, which=c(2), title(x))
}

### Note: in the previous iteration we inspected residuals after univariate modelling of biomarker by age (arbitrary). Here I fitted each variable model according to demographics and group, to try to minimize transformations that are premature or out of context to the final model.

Biomarker transformations to log, sqrt and box-cox versions

vars_KP<-df %>% dplyr::select(all_of(KP_data)) %>% names()

df[paste(vars_KP,sep="_", "log")] <- log(df[vars_KP])
df[paste(vars_KP,sep="_", "sqrt")] <- sqrt(df[vars_KP])
df[paste(vars_KP,sep="_", "inverse")] <- 1/(df[vars_KP])


#Box Cox transformation: IDO2
bc<-MASS::boxcox(ido2~sex_male+age+bmi+race_white+group, data=df)

(bc.power<-bc$x[which.max(bc$y)]) 
## [1] -2
BCTransform <- function(y, lambda=0) {
    if (lambda == 0L) { log(y) } else { (y^lambda - 1) / lambda }}

df$ido2_bc <- BCTransform(df$ido2, bc.power)

#Box Cox transformation: TDO2
bc<-MASS::boxcox(tdo2~sex_male+age+bmi+race_white+group, data=df)

(bc.power<-bc$x[which.max(bc$y)]) 
## [1] -0.2222222
BCTransform <- function(y, lambda=0) {
    if (lambda == 0L) { log(y) } else { (y^lambda - 1) / lambda }}

df$tdo2_bc <- BCTransform(df$tdo2, bc.power)

#Box Cox transformation: AADAT
bc<-MASS::boxcox(aadat~sex_male+age+bmi+race_white+group, data=df)

(bc.power<-bc$x[which.max(bc$y)]) 
## [1] -2
BCTransform <- function(y, lambda=0) {
    if (lambda == 0L) { log(y) } else { (y^lambda - 1) / lambda }}

df$aadat_bc <- BCTransform(df$aadat, bc.power)

#Box Cox transformation: acmsd
bc<-MASS::boxcox(acmsd~sex_male+age+bmi+race_white+group, data=df)

(bc.power<-bc$x[which.max(bc$y)]) 
## [1] -2
BCTransform <- function(y, lambda=0) {
    if (lambda == 0L) { log(y) } else { (y^lambda - 1) / lambda }}

df$acmsd_bc <- BCTransform(df$acmsd, bc.power)

#Box Cox transformation: kynu
bc<-MASS::boxcox(kynu~sex_male+age+bmi+race_white+group, data=df)

(bc.power<-bc$x[which.max(bc$y)]) 
## [1] 1.555556
BCTransform <- function(y, lambda=0) {
    if (lambda == 0L) { log(y) } else { (y^lambda - 1) / lambda }}

df$kynu_bc <- BCTransform(df$kynu, bc.power)

#Box Cox transformation: afmid
bc<-MASS::boxcox(afmid~sex_male+age+bmi+race_white+group, data=df)

(bc.power<-bc$x[which.max(bc$y)]) 
## [1] -1.191919
BCTransform <- function(y, lambda=0) {
    if (lambda == 0L) { log(y) } else { (y^lambda - 1) / lambda }}

df$afmid_bc <- BCTransform(df$afmid, bc.power)

#Visualize 

vars_KP_transformed<-df %>% dplyr::select(all_of(vars_KP), contains("log"), contains("sqrt"), contains("inverse")) %>%  names() %>% sort()

#final selection

bx_transformed<-c("aadat_bc", "acmsd_bc", "ido2_bc", "tdo2_bc", "haao_log")
bx_final_names<-df %>% dplyr::select(all_of(vars_KP), all_of(bx_transformed), -aadat, -acmsd, -ido2, -tdo2, -haao) %>% names()

for (x in bx_final_names) {
  LM1 <-  lm(substitute(i ~ sex_male+age+bmi+race_white+group, list(i = as.name(x))), data = df)
  graphics::plot(LM1, which=c(2), title(x))
}

### Note: Unlike prior iteration, it looks like IDO1 (raw) looks slightly better than IDO1 (log).

Comparing residuals for IDO1 by model

### Note: When IDO1 residuals are modelled by age, then log(IDO1) transform looks better (prior iteration). When IDO1 residuals are modelled in hypothesis driven manner (group, adjusted by demographics), then untransformed IDO1 looks better. I’m going to continue with hypothesis-driven models for each biomarker for this iteration. source: https://towardsdatascience.com/how-to-detect-unusual-observations-on-your-regression-model-with-r-de0eaa38bc5b

Comparison of biomarkers models according to group (adjusted for demographics)

Beta_coeff T_test Std_error p_value R_coeff
0.33 2.64 0.13 0.01 0.09
-0.20 -1.63 0.12 0.11 0.09
0.25 1.61 0.16 0.11 0.15
-0.30 -1.17 0.26 0.24 0.11
0.00 -0.87 0.00 0.39 0.02
0.00 -0.76 0.00 0.45 0.06
0.16 0.72 0.22 0.47 0.03
0.02 0.56 0.03 0.57 0.09
0.00 0.49 0.00 0.62 0.04
0.01 0.44 0.02 0.66 0.02
0.04 0.35 0.12 0.72 0.04
-0.04 -0.30 0.13 0.77 0.07

Note: This table is meant to be a “univariate-ish” version of the univariate analysis of each biomarker, in which I controlled for the entire set of hypothesis-driven IV’s (group adjusted by demo).

Leverage plots (residuals by cooks & hat values)

### Finding: observation 52 may be influential across multiple variables. See potential outliers and high leverage points per variable. May do sensitivity analysis.

Univariate analysis: sample characteristics according to ido1 (alpha=0.05)

Characteristic N Beta 95% CI1 p-value
group 148
HC
PC 0.147 -0.546, 0.839 0.7
SA 0.316 -0.270, 0.902 0.3
SI 0.769 0.190, 1.35 0.010
sex_male 132 -0.118 -0.563, 0.326 0.6
race_white 132 -0.388 -0.908, 0.132 0.14
age 132 0.023 -0.036, 0.082 0.4
bmi 114 -0.004 -0.046, 0.038 0.9
scid_ehr_mood_disorder 150 0.148 -0.298, 0.594 0.5
scid_ehr_psychotic 150 0.796 0.002, 1.59 0.049
scid_ehr_aud_sud 150 0.234 -0.190, 0.657 0.3
scid_ehr_anxiety 150 0.136 -0.310, 0.582 0.5
scid_ehr_ptsd 150 0.038 -0.474, 0.549 0.9
phq15_tot 148 0.004 -0.032, 0.040 0.8
gad_tot 148 0.020 -0.011, 0.051 0.2
phq_tot 148 0.020 -0.003, 0.044 0.093
bhs_tot 148 0.077 -0.006, 0.160 0.068
ctq_physical_tot 147 0.007 -0.045, 0.058 0.8
ctq_sexual_tot 146 -0.007 -0.046, 0.031 0.7
ctq_tot 147 0.004 -0.016, 0.025 0.7
pcl_tot 136 0.002 -0.008, 0.011 0.7
bps_tot 143 0.825 -0.477, 2.13 0.2
als_tot 142 0.182 -0.064, 0.428 0.15
apathy_tot 129 0.017 -0.009, 0.044 0.2
rfl_tot 139 0.001 -0.005, 0.006 0.8
dusib_tot 141 0.002 -0.004, 0.009 0.5
asiq_tot 148 0.005 0.001, 0.009 0.021
bis_tot 127 0.013 -0.003, 0.028 0.11
mspss_tot 129 -0.099 -0.258, 0.061 0.2
srrs_tot 129 0.042 0.012, 0.072 0.007
pss_tot 128 0.031 0.010, 0.053 0.005
shaps_tot 128 0.130 0.058, 0.201 <0.001
asr_total 139 0.003 -0.002, 0.007 0.2
crs 123 0.180 0.001, 0.359 0.049
fluoxetine 111 -0.234 -0.840, 0.373 0.4
escitalopram 111 0.023 -0.638, 0.683 >0.9
hydroxyzine 111 -0.181 -0.885, 0.523 0.6
trazodone 111 -0.622 -1.32, 0.073 0.079
aripiprazole 111 -0.003 -0.890, 0.884 >0.9
venlafaxine 111 0.527 -0.399, 1.45 0.3
lamotrigine 111 0.165 -0.722, 1.05 0.7
lithium 111 0.171 -0.715, 1.06 0.7
bupropion 111 -0.020 -1.24, 1.20 >0.9
suboxone 111 0.902 -0.311, 2.11 0.14
alcohol_30days 141 -0.252 -0.763, 0.259 0.3
amphetamines.stims.uppers_30days 140 -0.495 -1.30, 0.312 0.2
cocaine.crack_30days 141 0.238 -0.383, 0.859 0.4
otc.meds_30days 140 0.348 -0.110, 0.807 0.14
heroine.morphine.opiates_30days 140 0.255 -0.396, 0.906 0.4
presx.painkillers_30days 140 0.673 -0.024, 1.37 0.058
barbituates_30days 140 0.582 -0.591, 1.75 0.3
tranquilizers_30days 140 -0.126 -1.44, 1.19 0.8
lsd.hallucinogens_30days 141 0.747 -0.555, 2.05 0.3
ecstasy_30days 140 0.043 -0.898, 0.98 >0.9
marijuana_30days 140 0.110 -0.326, 0.547 0.6
smoke.tobacco_30days 140 0.059 -0.384, 0.502 0.8
chew.tobacco_30days 140 0.120 -0.692, 0.931 0.8
kmo 152 0.458 0.218, 0.698 <0.001
kynu 152 0.226 0.019, 0.432 0.032
afmid 152 -0.331 -0.668, 0.006 0.054
ccbl1 152 -0.026 -0.354, 0.302 0.9
ccbl2 152 0.838 0.500, 1.18 <0.001
got2 152 -0.308 -0.635, 0.020 0.065
aadat_bc 152 -1.76 -26.3, 22.7 0.9
acmsd_bc 152 -91.9 -181, -2.31 0.044
ido2_bc 152 -59.3 -92.1, -26.6 <0.001
tdo2_bc 152 2.41 -0.200, 5.01 0.070
haao_log 152 1.11 -0.278, 2.50 0.12

1 CI = Confidence Interval

Results: IDO1 significantly distinguishes SI from HC (p=0.01, ref=HC). This significance level is less than Emily’s version. Few covariates overall: scid_ehr_psychotic, asiq_tot, srrs_tot, pss_tot, shaps_tot, kmo, kynu, ccbl2, acmsd_bc, ido2_bc.

Univariate analysis: sample characterics according to group

Table 1. Patient Characteristics
Variable N Overall, N = 1481 Clinical Subgroup p-value2
HC, N = 321 PC, N = 231 SA, N = 451 SI, N = 481
sex_male 131 0.22
0 63 (48%) 17 (55%) 5 (26%) 21 (51%) 20 (50%)
1 68 (52%) 14 (45%) 14 (74%) 20 (49%) 20 (50%)
Unknown 17 1 4 4 8
race_white 131 0.24
0 31 (24%) 5 (16%) 5 (26%) 14 (34%) 7 (18%)
1 100 (76%) 26 (84%) 14 (74%) 27 (66%) 33 (82%)
Unknown 17 1 4 4 8
age 131 24.3 (3.8) 24.9 (3.5) 23.1 (3.2) 24.4 (3.8) 24.3 (4.3) 0.40
Unknown 17 1 4 4 8
bmi 112 25.6 (5.8) 26.3 (7.1) 23.9 (2.9) 25.9 (5.5) 25.6 (5.9) 0.59
Unknown 36 1 5 16 14
scid_ehr_mood_disorder 146 <0.001
0 47 (32%) 30 (100%) 5 (22%) 7 (16%) 5 (10%)
1 99 (68%) 0 (0%) 18 (78%) 38 (84%) 43 (90%)
Unknown 2 2 0 0 0
scid_ehr_psychotic 146 0.044
0 136 (93%) 30 (100%) 20 (87%) 44 (98%) 42 (88%)
1 10 (6.8%) 0 (0%) 3 (13%) 1 (2.2%) 6 (12%)
Unknown 2 2 0 0 0
scid_ehr_aud_sud 146 <0.001
0 86 (59%) 30 (100%) 7 (30%) 19 (42%) 30 (62%)
1 60 (41%) 0 (0%) 16 (70%) 26 (58%) 18 (38%)
Unknown 2 2 0 0 0
scid_ehr_anxiety 146 <0.001
0 99 (68%) 30 (100%) 12 (52%) 30 (67%) 27 (56%)
1 47 (32%) 0 (0%) 11 (48%) 15 (33%) 21 (44%)
Unknown 2 2 0 0 0
scid_ehr_ptsd 146 0.003
0 116 (79%) 30 (100%) 17 (74%) 32 (71%) 37 (77%)
1 30 (21%) 0 (0%) 6 (26%) 13 (29%) 11 (23%)
Unknown 2 2 0 0 0
phq15_tot 144 7.5 (5.6) 1.6 (1.7) 6.4 (4.3) 9.0 (4.7) 10.7 (5.5) <0.001
Unknown 4 0 0 2 2
gad_tot 144 9.1 (6.7) 0.5 (0.7) 9.2 (5.3) 11.4 (5.5) 12.9 (5.1) <0.001
Unknown 4 0 0 2 2
phq_tot 144 12 (9) 0 (1) 10 (7) 16 (7) 18 (6) <0.001
Unknown 4 0 0 2 2
bhs_tot 144 9.83 (2.52) 8.25 (1.93) 10.35 (2.98) 10.40 (2.59) 10.13 (2.18) <0.001
Unknown 4 0 0 2 2
ctq_physical_tot 143 8.0 (4.1) 5.3 (0.7) 8.3 (4.0) 9.8 (5.0) 8.0 (3.6) <0.001
Unknown 5 0 0 2 3
ctq_sexual_tot 142 7.2 (5.0) 5.0 (0.0) 5.7 (2.5) 9.6 (6.7) 7.5 (5.1) <0.001
Unknown 6 0 0 3 3
ctq_tot 143 58 (10) 52 (3) 58 (7) 63 (12) 59 (10) <0.001
Unknown 5 0 0 2 3
pcl_tot 132 31 (23) 1 (2) 28 (19) 44 (16) 41 (18) <0.001
Unknown 16 3 2 7 4
bps_tot 139 0.48 (0.16) 0.31 (0.06) 0.47 (0.14) 0.54 (0.16) 0.54 (0.14) <0.001
Unknown 9 0 1 4 4
als_tot 138 1.27 (0.87) 0.18 (0.20) 1.26 (0.72) 1.67 (0.70) 1.71 (0.66) <0.001
Unknown 10 0 1 4 5
apathy_tot 126 39 (9) 31 (3) 37 (7) 42 (9) 43 (8) <0.001
Unknown 22 1 2 10 9
rfl_tot 136 173 (43) 206 (23) 202 (28) 152 (47) 155 (33) <0.001
Unknown 12 0 2 4 6
dusib_tot 139 33 (34) 6 (10) 38 (30) 46 (36) 38 (34) <0.001
Unknown 9 0 2 3 4
asiq_tot 144 57 (49) 1 (2) 21 (22) 81 (42) 91 (35) <0.001
Unknown 4 0 0 2 2
bis_tot 124 65 (15) 50 (8) 64 (8) 71 (13) 72 (15) <0.001
Unknown 24 1 4 10 9
mspss_tot 126 5.31 (1.37) 6.58 (0.43) 5.12 (1.37) 4.83 (1.48) 4.84 (1.15) <0.001
Unknown 22 1 2 10 9
srrs_tot 126 11 (7) 4 (3) 12 (6) 14 (6) 14 (7) <0.001
Unknown 22 1 2 10 9
pss_tot 125 22 (10) 8 (5) 22 (8) 27 (7) 29 (5) <0.001
Unknown 23 1 3 10 9
shaps_tot 125 3.18 (3.05) 0.90 (1.62) 2.05 (1.82) 4.43 (3.45) 4.46 (2.84) <0.001
Unknown 23 1 3 10 9
asr_total 136 80 (49) 15 (10) 72 (32) 103 (37) 109 (34) <0.001
Unknown 12 0 3 4 5
crs 123
1 34 (28%) 30 (100%) 1 (5.3%) 1 (2.7%) 2 (5.4%)
2 16 (13%) 0 (0%) 11 (58%) 4 (11%) 1 (2.7%)
3 38 (31%) 0 (0%) 6 (32%) 12 (32%) 20 (54%)
4 25 (20%) 0 (0%) 1 (5.3%) 12 (32%) 12 (32%)
5 10 (8.1%) 0 (0%) 0 (0%) 8 (22%) 2 (5.4%)
Unknown 25 2 4 8 11
fluoxetine 110 22% (24) 0% (0) 12% (2) 30% (11) 31% (11) 0.010
Unknown 38 11 7 8 12
escitalopram 110 18% (20) 0% (0) 12% (2) 22% (8) 28% (10) 0.032
Unknown 38 11 7 8 12
hydroxyzine 110 15% (17) 0% (0) 12% (2) 22% (8) 19% (7) 0.091
Unknown 38 11 7 8 12
trazodone 110 15% (17) 0% (0) 6.2% (1) 30% (11) 14% (5) 0.012
Unknown 38 11 7 8 12
aripiprazole 110 8.2% (9) 0% (0) 12% (2) 2.7% (1) 17% (6) 0.061
Unknown 38 11 7 8 12
venlafaxine 110 7.3% (8) 0% (0) 0% (0) 11% (4) 11% (4) 0.27
Unknown 38 11 7 8 12
lamotrigine 110 9.1% (10) 0% (0) 0% (0) 19% (7) 8.3% (3) 0.057
Unknown 38 11 7 8 12
lithium 110 9.1% (10) 0% (0) 25% (4) 2.7% (1) 14% (5) 0.020
Unknown 38 11 7 8 12
bupropion 110 4.5% (5) 0% (0) 0% (0) 5.4% (2) 8.3% (3) 0.53
Unknown 38 11 7 8 12
suboxone 110 4.5% (5) 0% (0) 6.2% (1) 8.1% (3) 2.8% (1) 0.49
Unknown 38 11 7 8 12
alcohol_30days 139 0.24
0 33 (24%) 6 (19%) 3 (14%) 9 (21%) 15 (34%)
1 106 (76%) 26 (81%) 18 (86%) 33 (79%) 29 (66%)
Unknown 9 0 2 3 4
amphetamines.stims.uppers_30days 138 0.12
0 127 (92%) 32 (100%) 18 (86%) 37 (88%) 40 (93%)
1 11 (8.0%) 0 (0%) 3 (14%) 5 (12%) 3 (7.0%)
Unknown 10 0 2 3 5
cocaine.crack_30days 139 0.019
0 119 (86%) 32 (100%) 16 (76%) 35 (83%) 36 (82%)
1 20 (14%) 0 (0%) 5 (24%) 7 (17%) 8 (18%)
Unknown 9 0 2 3 4
otc.meds_30days 138 0.19
0 92 (67%) 25 (78%) 16 (76%) 24 (57%) 27 (63%)
1 46 (33%) 7 (22%) 5 (24%) 18 (43%) 16 (37%)
Unknown 10 0 2 3 5
heroine.morphine.opiates_30days 138 0.013
0 120 (87%) 32 (100%) 18 (86%) 32 (76%) 38 (88%)
1 18 (13%) 0 (0%) 3 (14%) 10 (24%) 5 (12%)
Unknown 10 0 2 3 5
presx.painkillers_30days 138 0.017
0 123 (89%) 32 (100%) 17 (81%) 34 (81%) 40 (93%)
1 15 (11%) 0 (0%) 4 (19%) 8 (19%) 3 (7.0%)
Unknown 10 0 2 3 5
barbituates_30days 138 0.62
0 133 (96%) 32 (100%) 20 (95%) 40 (95%) 41 (95%)
1 5 (3.6%) 0 (0%) 1 (4.8%) 2 (4.8%) 2 (4.7%)
Unknown 10 0 2 3 5
tranquilizers_30days 138 0.63
0 134 (97%) 32 (100%) 21 (100%) 40 (95%) 41 (95%)
1 4 (2.9%) 0 (0%) 0 (0%) 2 (4.8%) 2 (4.7%)
Unknown 10 0 2 3 5
lsd.hallucinogens_30days 139 0.63
0 135 (97%) 32 (100%) 21 (100%) 40 (95%) 42 (95%)
1 4 (2.9%) 0 (0%) 0 (0%) 2 (4.8%) 2 (4.5%)
Unknown 9 0 2 3 4
ecstasy_30days 138 0.18
0 130 (94%) 32 (100%) 20 (95%) 37 (88%) 41 (95%)
1 8 (5.8%) 0 (0%) 1 (4.8%) 5 (12%) 2 (4.7%)
Unknown 10 0 2 3 5
marijuana_30days 138 <0.001
0 68 (49%) 25 (78%) 4 (19%) 14 (33%) 25 (58%)
1 70 (51%) 7 (22%) 17 (81%) 28 (67%) 18 (42%)
Unknown 10 0 2 3 5
smoke.tobacco_30days 138 0.001
0 82 (59%) 28 (88%) 8 (38%) 22 (52%) 24 (56%)
1 56 (41%) 4 (12%) 13 (62%) 20 (48%) 19 (44%)
Unknown 10 0 2 3 5
chew.tobacco_30days 138 0.50
0 127 (92%) 31 (97%) 18 (86%) 39 (93%) 39 (91%)
1 11 (8.0%) 1 (3.1%) 3 (14%) 3 (7.1%) 4 (9.3%)
Unknown 10 0 2 3 5
ido1 148 5.37 (1.30) 5.00 (1.11) 5.14 (0.93) 5.31 (1.31) 5.77 (1.49) 0.048
kmo 148 6.21 (0.84) 6.39 (0.74) 5.86 (0.70) 6.11 (1.01) 6.36 (0.73) 0.052
kynu 148 5.89 (1.00) 5.85 (1.08) 5.97 (1.08) 5.76 (0.94) 6.02 (0.98) 0.63
afmid 148 3.63 (0.60) 3.74 (0.64) 3.58 (0.54) 3.66 (0.65) 3.54 (0.56) 0.49
ccbl1 148 6.17 (0.64) 6.15 (0.63) 6.35 (0.59) 6.04 (0.63) 6.22 (0.66) 0.26
ccbl2 148 8.41 (0.58) 8.33 (0.44) 8.57 (0.56) 8.35 (0.70) 8.43 (0.54) 0.41
got2 148 8.13 (0.64) 8.17 (0.47) 8.09 (0.64) 8.07 (0.75) 8.17 (0.63) 0.84
aadat_bc 148 0.454 (0.009) 0.454 (0.007) 0.455 (0.007) 0.454 (0.009) 0.455 (0.010) 0.88
acmsd_bc 148 0.4855 (0.0023) 0.4854 (0.0022) 0.4852 (0.0016) 0.4853 (0.0032) 0.4858 (0.0017) 0.70
ido2_bc 148 0.467 (0.006) 0.466 (0.006) 0.467 (0.007) 0.467 (0.006) 0.466 (0.006) 0.98
tdo2_bc 148 1.38 (0.08) 1.38 (0.08) 1.38 (0.08) 1.38 (0.08) 1.37 (0.08) 0.93
haao_log 148 1.54 (0.15) 1.55 (0.15) 1.54 (0.13) 1.53 (0.15) 1.55 (0.15) 0.85

1 Mean (SD) or n (%)

2 Pearson's Chi-squared test; Fisher's exact test; One-way ANOVA

Note: see supplementary table (excel file) for pairwise comparisons

Correlational analysis of covariates

#Correlation matrix of significant covariates from univariate analyses

covariate_df<-df %>% dplyr::select(ido1, asiq_tot, srrs_tot, pss_tot, shaps_tot, kmo, kynu, ccbl2, acmsd_bc, ido2_bc) %>% na.omit() %>% stats::cor()

p.mat<-ggcorrplot::cor_pmat(covariate_df)
ggcorrplot::ggcorrplot(covariate_df, 
           hc.order = TRUE, 
           type = "lower", 
           outline.color = "black",
           lab = TRUE,
           lab_size = 3,
           p.mat = p.mat, sig.level=0.05, insig="blank",
           digits=1,
           tl.srt=50,
           tl.cex=10,
           title="Pearson correlation matrix (alpha=0.05) - significant covariates")

### CCBL2 and KMO are not correlated here

Linear model #1: IDO1 by group only

## Anova Table (Type II tests)
## 
## Response: ido1
##            Sum Sq  Df F value  Pr(>F)  
## group      13.294   3  2.6956 0.04823 *
## Residuals 236.731 144                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##  contrast estimate    SE  df t.ratio p.value
##  HC - PC    -0.147 0.351 144 -0.418  0.9753 
##  HC - SA    -0.316 0.296 144 -1.067  0.7100 
##  HC - SI    -0.769 0.293 144 -2.628  0.0465 
##  PC - SA    -0.170 0.329 144 -0.517  0.9549 
##  PC - SI    -0.622 0.325 144 -1.914  0.2268 
##  SA - SI    -0.452 0.266 144 -1.701  0.3271 
## 
## P value adjustment: tukey method for comparing a family of 4 estimates
##  contrast effect.size    SE  df lower.CL upper.CL
##  HC - PC       -0.114 0.273 144   -0.655   0.4262
##  HC - SA       -0.247 0.232 144   -0.705   0.2112
##  HC - SI       -0.600 0.231 144   -1.056  -0.1432
##  PC - SA       -0.132 0.256 144   -0.639   0.3744
##  PC - SI       -0.485 0.255 144   -0.990   0.0191
##  SA - SI       -0.353 0.209 144   -0.765   0.0593
## 
## sigma used for effect sizes: 1.282 
## Confidence level used: 0.95
## 
## Call:
## lm(formula = ido1 ~ group, data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.4467 -1.0243 -0.1311  0.9608  2.9333 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   4.9978     0.2267  22.050  < 2e-16 ***
## groupPC       0.1465     0.3505   0.418  0.67652    
## groupSA       0.3164     0.2965   1.067  0.28767    
## groupSI       0.7689     0.2926   2.628  0.00953 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.282 on 144 degrees of freedom
##   (4 observations deleted due to missingness)
## Multiple R-squared:  0.05317,    Adjusted R-squared:  0.03345 
## F-statistic: 2.696 on 3 and 144 DF,  p-value: 0.04823

Findings: IDO1 distinguished group on ANOVA type II (p=0.048). IDO1 was associated with group level SI relative to HC (p=0.009, ES=0.60).

Linear model #2: IDO1 by demographics + group

## Anova Table (Type II tests)
## 
## Response: ido1
##             Sum Sq Df F value  Pr(>F)  
## sex_male     2.173  1  1.3722 0.24431  
## age          0.377  1  0.2382 0.62663  
## race_white   5.780  1  3.6502 0.05902 .
## bmi          0.088  1  0.0558 0.81372  
## group       13.376  3  2.8159 0.04318 *
## Residuals  153.587 97                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Call:
## lm(formula = ido1 ~ sex_male + age + race_white + bmi + group, 
##     data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.36633 -0.90789 -0.08619  0.87714  2.93644 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  5.352757   0.997693   5.365  5.5e-07 ***
## sex_male1   -0.299849   0.255976  -1.171   0.2443    
## age          0.016343   0.033488   0.488   0.6266    
## race_white1 -0.609398   0.318965  -1.911   0.0590 .  
## bmi         -0.005081   0.021504  -0.236   0.8137    
## groupPC      0.285290   0.399975   0.713   0.4774    
## groupSA      0.011214   0.338416   0.033   0.9736    
## groupSI      0.840957   0.325303   2.585   0.0112 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.258 on 97 degrees of freedom
##   (47 observations deleted due to missingness)
## Multiple R-squared:  0.1088, Adjusted R-squared:  0.0445 
## F-statistic: 1.692 on 7 and 97 DF,  p-value: 0.1199

Findings: IDO1 retains significance to group (distinguishes SI vs. HC)

Linear model #3: IDO1 by group and demo, adding covariates

## Anova Table (Type II tests)
## 
## Response: ido1
##             Sum Sq Df F value   Pr(>F)   
## sex_male     1.691  1  1.2860 0.259635   
## age          0.699  1  0.5314 0.467818   
## race_white   3.156  1  2.4007 0.124607   
## bmi          1.439  1  1.0946 0.298116   
## group        9.756  3  2.4735 0.066314 . 
## kmo          8.093  1  6.1560 0.014855 * 
## ccbl2       12.403  1  9.4337 0.002779 **
## Residuals  124.899 95                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Call:
## lm(formula = ido1 ~ sex_male + +age + race_white + bmi + group + 
##     kmo + ccbl2, data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.42775 -0.84368  0.01071  0.78327  2.47520 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -2.26562    1.90352  -1.190  0.23692   
## sex_male1   -0.27441    0.24198  -1.134  0.25963   
## age          0.02278    0.03126   0.729  0.46782   
## race_white1 -0.45484    0.29356  -1.549  0.12461   
## bmi         -0.02088    0.01996  -1.046  0.29812   
## groupPC      0.28233    0.39871   0.708  0.48062   
## groupSA      0.11182    0.31274   0.358  0.72147   
## groupSI      0.76085    0.29841   2.550  0.01238 * 
## kmo          0.39069    0.15747   2.481  0.01486 * 
## ccbl2        0.63105    0.20546   3.071  0.00278 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.147 on 95 degrees of freedom
##   (47 observations deleted due to missingness)
## Multiple R-squared:  0.2753, Adjusted R-squared:  0.2066 
## F-statistic: 4.009 on 9 and 95 DF,  p-value: 0.0002268

##                GVIF Df GVIF^(1/(2*Df))
## sex_male   1.169000  1        1.081203
## age        1.144853  1        1.069978
## race_white 1.101179  1        1.049371
## bmi        1.088614  1        1.043367
## group      1.455192  3        1.064519
## kmo        1.281507  1        1.132037
## ccbl2      1.204981  1        1.097716

Note: manual backwards regression

Stepwise model (forward and backward, automated)

# Stepwise regression model as second opinion for variable selection (keep kynu or not)
step_df<-df %>% dplyr::select(c("ido1", "sex_male", "age", "bmi", "race_white", "group",  "kmo", "ido2_bc", "ccbl2", "kynu")) %>% na.omit()
res.lm <- lm(ido1 ~ ., data = step_df)
step <- MASS::stepAIC(res.lm, direction = "both", trace = FALSE)
car::Anova(step, type = "II")
## Anova Table (Type II tests)
## 
## Response: ido1
##             Sum Sq Df F value  Pr(>F)   
## race_white   3.752  1  2.9555 0.08878 . 
## group        9.782  3  2.5683 0.05880 . 
## kmo          5.182  1  4.0821 0.04610 * 
## ido2_bc      4.899  1  3.8588 0.05235 . 
## ccbl2        9.846  1  7.7553 0.00644 **
## Residuals  123.144 97                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(step)
## 
## Call:
## lm(formula = ido1 ~ race_white + group + kmo + ido2_bc + ccbl2, 
##     data = step_df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.87188 -0.85287 -0.06194  0.83522  2.71497 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  15.0920     9.0402   1.669  0.09826 . 
## race_white1  -0.4980     0.2897  -1.719  0.08878 . 
## groupPC       0.1767     0.3650   0.484  0.62934   
## groupSA       0.1167     0.3069   0.380  0.70454   
## groupSI       0.7497     0.2906   2.580  0.01139 * 
## kmo           0.2994     0.1482   2.020  0.04610 * 
## ido2_bc     -34.9755    17.8049  -1.964  0.05235 . 
## ccbl2         0.5670     0.2036   2.785  0.00644 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.127 on 97 degrees of freedom
## Multiple R-squared:  0.2855, Adjusted R-squared:  0.2339 
## F-statistic: 5.536 on 7 and 97 DF,  p-value: 2.217e-05

Note: looks like KMO and CCBL2 at least, should be included in model

Linear model #4: IDO1 according to demo, group, and kmo:group interaction

## Anova Table (Type II tests)
## 
## Response: ido1
##             Sum Sq Df F value    Pr(>F)    
## sex_male     4.020  1  2.9168 0.0910003 .  
## age          1.483  1  1.0757 0.3023424    
## race_white   3.142  1  2.2800 0.1344416    
## bmi          0.709  1  0.5145 0.4749909    
## group       13.194  3  3.1910 0.0272358 *  
## kmo         16.285  1 11.8165 0.0008798 ***
## group:kmo    9.129  3  2.2080 0.0923473 .  
## Residuals  128.173 93                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Call:
## lm(formula = ido1 ~ sex_male + +age + race_white + bmi + group * 
##     kmo, data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.7421 -0.7958 -0.0463  0.6967  2.6218 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)  4.40966    2.15410   2.047   0.0435 *
## sex_male1   -0.41964    0.24571  -1.708   0.0910 .
## age          0.03337    0.03218   1.037   0.3023  
## race_white1 -0.46288    0.30655  -1.510   0.1344  
## bmi         -0.01484    0.02068  -0.717   0.4750  
## groupPC      1.10987    3.23521   0.343   0.7323  
## groupSA     -5.11637    2.44399  -2.093   0.0390 *
## groupSI     -1.99113    2.64449  -0.753   0.4534  
## kmo          0.11067    0.30332   0.365   0.7160  
## groupPC:kmo -0.12260    0.54409  -0.225   0.8222  
## groupSA:kmo  0.85983    0.39060   2.201   0.0302 *
## groupSI:kmo  0.44935    0.41587   1.080   0.2827  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.174 on 93 degrees of freedom
##   (47 observations deleted due to missingness)
## Multiple R-squared:  0.2563, Adjusted R-squared:  0.1683 
## F-statistic: 2.913 on 11 and 93 DF,  p-value: 0.00242
## (Intercept)   sex_male1         age race_white1         bmi     groupPC     groupSA     groupSI         kmo groupPC:kmo groupSA:kmo groupSI:kmo 
##       0.200      -0.167       0.101      -0.147      -0.070       0.033      -0.204      -0.073       0.036      -0.022       0.215       0.105
##                    GVIF Df GVIF^(1/(2*Df))
## sex_male   1.149842e+00  1        1.072307
## age        1.157429e+00  1        1.075839
## race_white 1.145496e+00  1        1.070278
## bmi        1.115393e+00  1        1.056122
## group      3.437613e+05  3        8.369692
## kmo        4.535924e+00  1        2.129771
## group:kmo  3.435284e+05  3        8.368747

##        StudRes        Hat      CookD
## 17   2.4000769 0.08986137 0.04508734
## 52  -0.6278348 0.35703624 0.01836004
## 131  1.7665466 0.29158933 0.10465584
## 147 -2.6573749 0.17704511 0.11885289

Linear model #5: IDO1 according to demo, group, and CCBL2:group interaction

## 
## Call:
## lm(formula = ido1 ~ sex_male + +age + race_white + bmi + group * 
##     ccbl2, data = df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -3.08913 -0.79039  0.01909  0.78736  2.63842 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)  
## (Intercept)     4.660277   4.091826   1.139   0.2577  
## sex_male1      -0.151306   0.239757  -0.631   0.5295  
## age             0.007795   0.031033   0.251   0.8022  
## race_white1    -0.567889   0.302691  -1.876   0.0638 .
## bmi            -0.015866   0.019870  -0.798   0.4266  
## groupPC        -7.398578   5.957462  -1.242   0.2174  
## groupSA        -2.297322   4.715773  -0.487   0.6273  
## groupSI       -11.148783   4.993524  -2.233   0.0280 *
## ccbl2           0.130735   0.474341   0.276   0.7835  
## groupPC:ccbl2   0.871082   0.699649   1.245   0.2163  
## groupSA:ccbl2   0.274239   0.564387   0.486   0.6282  
## groupSI:ccbl2   1.415644   0.595451   2.377   0.0195 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.147 on 93 degrees of freedom
##   (47 observations deleted due to missingness)
## Multiple R-squared:  0.2901, Adjusted R-squared:  0.2061 
## F-statistic: 3.455 on 11 and 93 DF,  p-value: 0.0004625
##   (Intercept)     sex_male1           age   race_white1           bmi       groupPC       groupSA       groupSI         ccbl2 groupPC:ccbl2 groupSA:ccbl2 groupSI:ccbl2 
##         0.111        -0.062         0.025        -0.183        -0.078        -0.121        -0.048        -0.218         0.027         0.122         0.047         0.232
##                     GVIF Df GVIF^(1/(2*Df))
## sex_male    1.146917e+00  1        1.070942
## age         1.127871e+00  1        1.062013
## race_white  1.170057e+00  1        1.081692
## bmi         1.078559e+00  1        1.038537
## group       1.298655e+07  3       15.331416
## ccbl2       6.418779e+00  1        2.533531
## group:ccbl2 1.372637e+07  3       15.473644

##        StudRes       Hat       CookD
## 12  -2.9966061 0.1228728 0.096542902
## 24  -0.6928566 0.3446842 0.021159782
## 31   2.5533881 0.1402044 0.083633102
## 102  0.1979037 0.4028169 0.002224524
## 118  1.8966409 0.2884065 0.118195159

Note: there were no interactions between group and demo vars

Exploratory model #1: ordinal logistic regression

## Call:
## MASS::polr(formula = group_ordinal ~ sex_male + age + bmi + race_white + 
##     ido1, data = df, Hess = TRUE)
## 
## Coefficients:
##                Value Std. Error t value
## sex_male1   -0.02861     0.3644 -0.0785
## age          0.01699     0.0465  0.3654
## bmi          0.00151     0.0324  0.0466
## race_white1 -0.51885     0.4695 -1.1051
## ido1         0.07579     0.1362  0.5565
## 
## Intercepts:
##       Value  Std. Error t value
## HC|PC -0.510  1.601     -0.319 
## PC|SI  0.201  1.603      0.125 
## SI|SA  1.491  1.615      0.923 
## 
## Residual Deviance: 284.1552 
## AIC: 300.1552 
## (47 observations deleted due to missingness)
## Waiting for profiling to be done...
##                    OR     2.5 %   97.5 %
## sex_male1   0.9717995 0.4749505 1.988987
## age         1.0171328 0.9284528 1.114674
## bmi         1.0015085 0.9401703 1.068182
## race_white1 0.5952055 0.2334536 1.486624
## ido1        1.0787394 0.8249346 1.410544
##    sex_male1          age          bmi  race_white1         ido1 
## -0.028605798  0.016987700  0.001507405 -0.518848547  0.075793167

## -------------------------------------------- 
## Test for X2  df  probability 
## -------------------------------------------- 
## Omnibus      84  10  0
## sex_male1    6.55    2   0.04
## age      5.07    2   0.08
## bmi      4.57    2   0.1
## race_white1  10.5    2   0.01
## ido1     8   2   0.02
## -------------------------------------------- 
## 
## H0: Parallel Regression Assumption holds

Exploratory model #2: multinomial regression

## # weights:  28 (18 variable)
## initial  value 145.560908 
## iter  10 value 133.769710
## iter  20 value 129.494224
## final  value 129.467553 
## converged
##    (Intercept)  sex_male1       age race_white1       bmi       ido1
## PC   0.3083239 0.02052843 0.1094183   0.8602799 0.2121117 0.45489127
## SA   0.9267028 0.74341920 0.7279717   0.1413323 0.7158462 0.94325537
## SI   0.4774108 0.48535501 0.1918654   0.2028456 0.9498060 0.01312516

https://rpubs.com/rslbliss/r_logistic_ws