library(foreign)
Biok_vert <- read.spss("Bio_Ketamine_verticAL FILE.sav", use.value.label=TRUE, to.data.frame=TRUE)
## re-encoding from UTF-8
colnames(Biok_vert)
##  [1] "Sample_ID"            "age"                  "sex"                 
##  [4] "BMI"                  "race"                 "patientno"           
##  [7] "infusiononeandthree"  "infusionno"           "Blood_Draw_Event"    
## [10] "suicide"              "BSS_Score"            "MADRS_Score"         
## [13] "Remission"            "threegroups"          "ResponderANDREMITTER"
## [16] "remitternoresponse"   "Site_Location"        "Batch_Number"        
## [19] "PIC_nM"               "NIC_nM"               "NIC_nM_LLOD"         
## [22] "NTA_nM"               "QUINPICratio"         "Quin_nM"             
## [25] "QUINKYNAratio"        "three_HK_nM"          "five_HT_nM"          
## [28] "KYNSERratio"          "KYN_nM"               "TRP_nM"              
## [31] "KYNTRPratio"          "KYNA_nM"              "AA_nM"               
## [34] "IFNy_pg_mL"           "IL10_pg_mL"           "IL12p70_pg_mL"       
## [37] "IL12p70_pg_mL_LLOD"   "IL13_pg_mL"           "IL13_pg_mL_LLOD"     
## [40] "IL1B_pg_mL"           "IL1B_pg_mL_LLOD"      "IL2_pg_mL"           
## [43] "IL2_pg_mL_LLOD"       "IL4_pg_mL"            "IL4_pg_mL_LLOD"      
## [46] "IL6_pg_mL"            "IL8_pg_mL"            "TNFa_pg_mL"          
## [49] "CRP_ng_mL"            "SAA_ng_mL"            "VCAM_1_ng_mL"        
## [52] "ICAM_1_ng_mL"         "lnCRP"                "lnSAA"               
## [55] "lnAA"                 "lnTNF"                "lnICAM"              
## [58] "lnVCAM"               "lnIFN"                "lnIL10"              
## [61] "lnIL13"               "ln3HK"                "lnPIC"               
## [64] "lnSER"                "lnKYNSER"
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
vars_KP<-c("TRP_nM",
           "five_HT_nM",
           "KYN_nM", 
           "three_HK_nM",
           "ln3HK",
           "KYNA_nM",
           "PIC_nM" ,
           "lnPIC",
           "Quin_nM",
           "AA_nM",
           "lnAA" ,
           "lnSER", 
           "lnSAA",
           "lnKYNSER",
           "KYNTRPratio" ,
           "KYNSERratio",
           "QUINPICratio",
           "QUINKYNAratio")

vars_vasc<-c("NIC_nM",
             "NIC_nM_LLOD",
             "NTA_nM",
             "SAA_ng_mL",
             "VCAM_1_ng_mL",
             "lnVCAM",
             "ICAM_1_ng_mL",
             "lnICAM")

vars_inflam<-c("IL1B_pg_mL",
               "IL1B_pg_mL_LLOD",
               "IL2_pg_mL",
               "IL2_pg_mL_LLOD",
               "IL4_pg_mL",
               "IL4_pg_mL_LLOD",
               "IL6_pg_mL",
               "IL8_pg_mL",
               "IL10_pg_mL",
               "lnIL10",
               "IL12p70_pg_mL",
               "IL12p70_pg_mL_LLOD",
               "IL13_pg_mL",
               "IL13_pg_mL_LLOD",
               "lnIL13",
               "TNFa_pg_mL",
               "lnTNF",
               "IFNy_pg_mL",
               "lnIFN",
               "CRP_ng_mL",
               "lnCRP")


vars_demo<-c("patientno","age", "sex", "BMI", "race" )
vars_tx<-c("Site_Location", "infusionno", "Sample_ID", "Batch_Number")
vars_cx<-c("BSS_Score","MADRS_Score", "Remission")

Biok_vert$infusionno<-dplyr::recode_factor(Biok_vert$infusionno, Baseline="BL", `end of first infusion` = "1st", `End of third infusion` = "3rd")
Biok_vert_df<-Biok_vert %>% dplyr::select(all_of(vars_demo), 
                                          all_of(vars_tx), 
                                          "infusionno",
                                          all_of(vars_cx),
                                          all_of(vars_KP),
                                          all_of(vars_inflam),
                                          all_of(vars_vasc))
M<- sapply(Biok_vert_df, function(x) sum(is.na(x))); M[M>0]
##     BSS_Score   MADRS_Score     Remission    IL1B_pg_mL     IL2_pg_mL 
##             5             1             3           176            66 
##     IL4_pg_mL IL12p70_pg_mL    IL13_pg_mL 
##             1             1             3

COMMENTARY: IL1B had highest missingness for some reason

library(ggfortify)
## Loading required package: ggplot2
mod<-lm((TRP_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Observation 119 - high leverage outlier no transformation needed

mod<-lm((five_HT_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm((lnSER)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Log transform looks better. Shapiro-wilk of log transformed still bad p<0.004. Sqrt transform looks worse than log transform Problematic observations: 177, 156

mod<-lm((KYN_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(KYN_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(KYN_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Decision = use raw variable, which looks same as sqrt transform (same shapiro wilke p=0.16) Problematic observation: 42 (persists across transformations)

mod<-lm((three_HK_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

shapiro.test(Biok_vert_df$three_HK_nM)
## 
##  Shapiro-Wilk normality test
## 
## data:  Biok_vert_df$three_HK_nM
## W = 0.70678, p-value < 2.2e-16
mod<-lm((ln3HK)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

shapiro.test(Biok_vert_df$ln3HK)
## 
##  Shapiro-Wilk normality test
## 
## data:  Biok_vert_df$ln3HK
## W = 0.93953, p-value = 7.335e-08

ln transform of 3HK is definitely better. May improve with box-cox transformation though. Problematic observation: 42

mod<-lm((KYNA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(KYNA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(KYNA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#create log transformation variable
Biok_vert_df$KYNA_nM_log<-log(Biok_vert_df$KYNA_nM)

Going with log transform

mod<-lm((PIC_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

shapiro.test(Biok_vert_df$PIC_nM)
## 
##  Shapiro-Wilk normality test
## 
## data:  Biok_vert_df$PIC_nM
## W = 0.53863, p-value < 2.2e-16
mod<-lm((lnPIC)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

shapiro.test(Biok_vert_df$lnPIC)
## 
##  Shapiro-Wilk normality test
## 
## data:  Biok_vert_df$lnPIC
## W = 0.96789, p-value = 7.416e-05

lnPic is better than raw. Again point 42 is outlier with high leverage

mod<-lm((Quin_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

shapiro.test(Biok_vert_df$Quin_nM)
## 
##  Shapiro-Wilk normality test
## 
## data:  Biok_vert_df$Quin_nM
## W = 0.95595, p-value = 3.027e-06
mod<-lm(log(Quin_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(Quin_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Raw variable looks better than log or sqrt transformed.

mod<-lm((AA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(AA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Biok_vert_df$AA_nM_log<-log(Biok_vert_df$AA_nM)


mod<-lm(sqrt(AA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Log transformed (lnAA) looks best.

mod<-lm((KYNTRPratio)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm((KYNSERratio)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm((QUINPICratio)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm((QUINKYNAratio)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Im unsure if these ratios were computed from raw or transformed values, so we can either recompute for clarity, or wait for feedback on composite variables.

mod<-lm(NIC_nM~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(NIC_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#LLOD

mod<-lm(NIC_nM_LLOD~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(NIC_nM_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Biok_vert_df$NIC_nM_LLOD_log<-log(Biok_vert_df$NIC_nM_LLOD) #creating log transformed variable

mod<-lm(sqrt(NIC_nM_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Raw and LLOD variables look the same; needs tranformation. Raw has 0’s in it so log didn’t work; used sqrt but unhelpful Log transform of LLOD is best option, but still bad. HELP! Consider box-cox…wont work since response variable not positive.. Outliers 10, 82, 15 but low leverage

mod<-lm((NTA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(NTA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(NTA_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Biok_vert_df$NTA_nM_sqrt<-sqrt(Biok_vert_df$NTA_nM) #creating sqrt transformed variable

sqrt transformation has better qqplot than raw or log. Will use sqrt here Observation 32 is problematic (likely outlier with lots of pull)

mod<-lm((SAA_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(SAA_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(SAA_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Biok_vert_df$SAA_ng_mL_log<-sqrt(Biok_vert_df$SAA_ng_mL) #creating log transformed variable

Not sure if log or sqrt is better; either qq tail is skewed a bit. Points 104 and 148 are influential outliers just use log

mod<-lm((VCAM_1_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(lnVCAM~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(VCAM_1_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

ln transformed VCAM_1_ng_mL looks best

mod<-lm((ICAM_1_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(lnICAM~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(ICAM_1_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

ln transform of ICAM looks the best Observation 11 and 32 look like influential outliers

mod<-lm(IL1B_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL1B_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL1B_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#LLOD variations

mod<-lm(IL1B_pg_mL_LLOD~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL1B_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL1B_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#Creating log transformed variable
Biok_vert_df$IL1B_pg_mL_log<-log(Biok_vert_df$IL1B_pg_mL_LLOD)
Biok_vert_df$IL1B_pg_mL_LLOD_log<-log(Biok_vert_df$IL1B_pg_mL_LLOD)

log looks best in raw or LLOD LLOD looks better than raw observation 72 and 196 seem problematic unsure how to use LLOD set

mod<-lm(IL4_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL4_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL4_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#LLOD variations

mod<-lm(IL4_pg_mL_LLOD~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL4_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL4_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#Creating log transformed variable 
Biok_vert_df$IL4_pg_mL_log<-log(Biok_vert_df$IL4_pg_mL)
Biok_vert_df$IL4_pg_mL_LLOD_log<-log(Biok_vert_df$IL4_pg_mL_LLOD)

Log transformation looks best for both raw and LLOD variables Observations 101 and 119 seem to be influential outliers

mod<-lm(IL6_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL6_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL6_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#Creating log transformed variable
Biok_vert_df$IL6_pg_mL_log<-log(Biok_vert_df$IL6_pg_mL)

Log is best for IL6 Potentially influential outliers 93, 81, 21

mod<-lm(IL8_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL8_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL8_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#Creating log transformed variable
Biok_vert_df$IL8_pg_mL_log<-log(Biok_vert_df$IL8_pg_mL)

log transform of IL8 seems best, probably not good enough

mod<-lm(IL10_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm((lnIL10)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL10_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Raw variable is the best, although all are pretty bad May consider box-cox transformation Observations 45, 118, and 191 are closely clustered outliers, moderate leverage

mod<-lm(IL12p70_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL12p70_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL12p70_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#LLOD


mod<-lm(IL12p70_pg_mL_LLOD~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL12p70_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL12p70_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Raw looks similar to log and sqrt transformations - go with raw Outlier observations: 64, 137, 210 Need help with raw vs. LLOD selection

mod<-lm(IL13_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL13_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL13_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#LLOD


mod<-lm(IL13_pg_mL_LLOD~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL13_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IL13_pg_mL_LLOD)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Untransformed looks best for both raw and LLOD Outliers: 64, 137, 210

mod<-lm(TNFa_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(TNFa_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(TNFa_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#Creating log transformed variable
Biok_vert_df$TNFa_pg_mL_sqrt<-sqrt(Biok_vert_df$TNFa_pg_mL)

sqrt transformation looks slightly better than raw TNF Outliers have lower leverage: 66, 139, 212

mod<-lm(IFNy_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IFNy_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(IFNy_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

log and sqrt transformed qq plots look so bad that a box-cox tranformation might be required here

mod<-lm(CRP_ng_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(CRP_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(sqrt(CRP_ng_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

#Creating log transformed variable
Biok_vert_df$CRP_ng_mL_log<-log(Biok_vert_df$CRP_ng_mL)

log transform looks the best for CRP problematic observations: 11 has high leverage; 137 amd 64 have moderate leverage

#COX BOX TRANFORMATIONS: IFN-gamma
#creating box-cox function

library(MASS)
## 
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
## 
##     select
bc<-boxcox(IFNy_pg_mL~age, data=Biok_vert_df)

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

#testing

yt <- BCTransform(Biok_vert_df$IFNy_pg_mL, 0)
yo <- BCTransformInverse(yt, 0)
unique(round(yo-Biok_vert_df$IFNy_pg_mL),8)
## [1] 0
yt <- BCTransform(Biok_vert_df$IFNy_pg_mL, 0.5)
yo <- BCTransformInverse(yt, 0.5)
unique(round(yo-Biok_vert_df$IFNy_pg_mL),8)
## [1] 0
#Box-cox transformations

Biok_vert_df$IFNy_pg_mL_boxcox <- BCTransform(Biok_vert_df$IFNy_pg_mL, bc.power)

#Visualize

mod<-lm(IFNy_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IFNy_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(IFNy_pg_mL_boxcox~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Box cox tranformation looks better than log transform Select box cox for IFNy

http://www.css.cornell.edu/faculty/dgr2/_static/files/R_html/Transformations.html

#COX BOX TRANFORMATIONS: 3HK
#creating box-cox function\

bc<-boxcox(three_HK_nM~age, data=Biok_vert_df)

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

#testing

yt <- BCTransform(Biok_vert_df$three_HK_nM, 0)
yo <- BCTransformInverse(yt, 0)
unique(round(yo-Biok_vert_df$three_HK_nM),8)
## [1] 0
yt <- BCTransform(Biok_vert_df$three_HK_nM, 0.5)
yo <- BCTransformInverse(yt, 0.5)
unique(round(yo-Biok_vert_df$three_HK_nM),8)
## [1] 0
#Box-cox transformations

Biok_vert_df$three_HK_nM_boxcox <- BCTransform(Biok_vert_df$three_HK_nM, bc.power)

#Visualize

mod<-lm(three_HK_nM~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(three_HK_nM)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(three_HK_nM_boxcox~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Use box-cox for 3HK Beware high leverage outliers 83 and 177

#COX BOX TRANFORMATIONS: IL10
#creating box-cox function

bc<-boxcox(IL10_pg_mL~age, data=Biok_vert_df)

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

#testing

yt <- BCTransform(Biok_vert_df$IL10_pg_mL, 0)
yo <- BCTransformInverse(yt, 0)
unique(round(yo-Biok_vert_df$IL10_pg_mL),8)
## [1] 0
yt <- BCTransform(Biok_vert_df$IL10_pg_mL, 0.5)
yo <- BCTransformInverse(yt, 0.5)
unique(round(yo-Biok_vert_df$IL10_pg_mL),8)
## [1] 0
#Box-cox transformations

Biok_vert_df$IL10_pg_mL_boxcox <- BCTransform(Biok_vert_df$IL10_pg_mL, bc.power)

#Visualize

mod<-lm(IL10_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(log(IL10_pg_mL)~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

mod<-lm(IL10_pg_mL~age, data=Biok_vert_df)
autoplot(mod, which=1:6, ncol=3)

Raw variable looks better than log transform Cox box transformation looks same as raw Will utilize raw variable for IL-10

#Final variable set post (best attempt) transformations, not including ratios

vars_bx_trans<-c("TRP_nM",
                  "lnSER",
                  "KYN_nM",
                  "three_HK_nM_boxcox",
                  "KYNA_nM_log",
                  "lnPIC",
                  "Quin_nM",
                  "lnAA",
                  "NIC_nM_LLOD_log",
                  "NTA_nM_sqrt",
                  "SAA_ng_mL_log",
                  "lnVCAM",
                  "lnICAM", 
                  "IL1B_pg_mL_log",
                  "IL1B_pg_mL_LLOD_log",
                  "IL2_pg_mL",
                  "IL4_pg_mL_log",
                  "IL4_pg_mL_LLOD_log",
                  "IL6_pg_mL_log",
                  "IL8_pg_mL_log",
                  "IL10_pg_mL",
                  "IL12p70_pg_mL",
                  "IL12p70_pg_mL_LLOD",
                  "IL13_pg_mL",
                  "IL13_pg_mL_LLOD",
                  "TNFa_pg_mL_sqrt",
                  "IFNy_pg_mL_boxcox",
                  "CRP_ng_mL_log")


df_trans<-Biok_vert_df %>% dplyr::select(all_of(vars_demo),
                                          all_of(vars_tx),
                                          all_of(vars_cx),
                                          all_of(vars_bx_trans))
df_trans %>% 
  dplyr::select(c(-patientno, -Sample_ID)) %>% 
  gtsummary::tbl_summary()
Characteristic N = 2181
age 47 (34, 55)
sex
male 82 (38%)
female 136 (62%)
BMI 28.1 (24.9, 31.7)
race
asian 3 (1.4%)
black 4 (1.8%)
white 211 (97%)
Site_Location
Johns Hopkins 22 (10%)
Univeristy of Michigan 69 (32%)
Mayo Clinic 114 (52%)
Pine Rest 13 (6.0%)
infusionno
BL 73 (33%)
1st 72 (33%)
3rd 73 (33%)
Batch_Number
1 35 (16%)
2 37 (17%)
3 37 (17%)
4 36 (17%)
5 36 (17%)
6 37 (17%)
BSS_Score 0.0 (0.0, 8.0)
Unknown 5
MADRS_Score 16 (8, 25)
Unknown 1
Remission
No remission 77 (36%)
Remitter 138 (64%)
Unknown 3
TRP_nM 25,642 (20,408, 29,795)
lnSER 4.32 (3.36, 5.62)
KYN_nM 898 (751, 1,038)
three_HK_nM_boxcox 1.037 (1.019, 1.059)
KYNA_nM_log 2.91 (2.63, 3.15)
lnPIC 2.83 (2.55, 3.11)
Quin_nM 141 (109, 175)
lnAA 1.65 (1.43, 1.93)
NIC_nM_LLOD_log -0.67 (-1.08, -0.01)
NTA_nM_sqrt 16.9 (13.9, 19.8)
SAA_ng_mL_log 47 (36, 64)
lnVCAM 5.73 (5.56, 5.86)
lnICAM 5.66 (5.54, 5.87)
IL1B_pg_mL_log
-1.12936028423984 211 (97%)
-1.08675143155781 1 (0.5%)
-0.885288513121754 1 (0.5%)
-0.813372591137231 1 (0.5%)
-0.560070844958166 1 (0.5%)
-0.442332943131407 1 (0.5%)
0.473671672492252 1 (0.5%)
1.00177015061474 1 (0.5%)
IL1B_pg_mL_LLOD_log
-1.12936028423984 211 (97%)
-1.08675143155781 1 (0.5%)
-0.885288513121754 1 (0.5%)
-0.813372591137231 1 (0.5%)
-0.560070844958166 1 (0.5%)
-0.442332943131407 1 (0.5%)
0.473671672492252 1 (0.5%)
1.00177015061474 1 (0.5%)
IL2_pg_mL 0.38 (0.28, 0.56)
Unknown 66
IL4_pg_mL_log -2.46 (-2.67, -2.27)
Unknown 1
IL4_pg_mL_LLOD_log -2.46 (-2.67, -2.27)
IL6_pg_mL_log -0.11 (-0.40, 0.19)
IL8_pg_mL_log 1.43 (1.20, 1.61)
IL10_pg_mL 0.36 (0.28, 0.44)
IL12p70_pg_mL 0.39 (0.30, 0.49)
Unknown 1
IL12p70_pg_mL_LLOD 0.39 (0.30, 0.49)
IL13_pg_mL 3.62 (3.16, 4.11)
Unknown 3
IL13_pg_mL_LLOD 3.62 (3.15, 4.11)
TNFa_pg_mL_sqrt 1.16 (1.08, 1.27)
IFNy_pg_mL_boxcox 0.95 (0.87, 1.04)
CRP_ng_mL_log 7.10 (6.07, 7.98)

1 Median (IQR); n (%)

library(ggplot2)
library(ggcorrplot)

bx_inflam<-df_trans %>% dplyr::select(c("NTA_nM_sqrt",
                                        "SAA_ng_mL_log",
                                        "lnVCAM",
                                        "lnICAM",
                                        "IL1B_pg_mL_log",
                                        "IL1B_pg_mL_LLOD_log",
                                        "IL2_pg_mL",
                                        "IL4_pg_mL_log",
                                        "IL4_pg_mL_LLOD_log",
                                        "IL6_pg_mL_log",
                                        "IL8_pg_mL_log",
                                        "IL10_pg_mL",
                                        "IL12p70_pg_mL",
                                        "IL12p70_pg_mL_LLOD",
                                        "IL13_pg_mL",
                                        "IL13_pg_mL_LLOD",
                                        "TNFa_pg_mL_sqrt",
                                        "IFNy_pg_mL_boxcox",
                                        "CRP_ng_mL_log")) 

 ggcorrplot(cor(bx_inflam), hc.order = FALSE, type = "lower", lab = TRUE)

 bx_kp<-df_trans %>% dplyr::select(c("TRP_nM",
                                    "lnSER",
                                    "KYN_nM",
                                    "three_HK_nM_boxcox",
                                      "KYNA_nM_log",
                                    "lnPIC",
                                    "Quin_nM",
                                    "lnAA",
                                    "NIC_nM_LLOD_log"))
 
ggcorrplot(cor(bx_kp), hc.order = TRUE, type = "lower", lab = TRUE)

Note: the inflammatory matrix is messed up, likely due to NA’s … wont show as ordered

#Convert from long to wide format

Biok_wide<-df_trans %>% tidyr::pivot_wider(names_from = infusionno, 
                                               values_from = c(all_of(vars_tx), 
                                                               all_of(vars_cx), 
                                                               all_of(vars_bx_trans), 
                                                              -Remission, 
                                                              -infusionno))

#recode as numeric variable 

Biok_wide[c("Sample_ID_BL",
            "Sample_ID_1st",
            "Sample_ID_3rd")] <- lapply(Biok_wide[c("Sample_ID_BL",
                                                    "Sample_ID_1st",
                                                    "Sample_ID_3rd")], as.numeric)

#Selecting biomarker variables by timepoint for ease of selection
vars_BL<-tidyselect::vars_select(names(Biok_wide), ends_with("BL"))
vars_1st<-tidyselect::vars_select(names(Biok_wide), ends_with("1st"))
vars_3rd<-tidyselect::vars_select(names(Biok_wide), ends_with("3rd"))
Biok_wide %>%
  dplyr::select(., 
                -patientno,
                -Site_Location_BL,
                -Site_Location_1st,
                -Site_Location_3rd,
                -Sample_ID_BL,
                -Sample_ID_1st,
                -Sample_ID_3rd,
                -Batch_Number_BL,
                -Batch_Number_1st,
                -Batch_Number_3rd) %>%
  gtsummary::tbl_uvregression(method = lm, y= MADRS_Score_BL) %>%
  gtsummary::add_global_p() %>%
  gtsummary::bold_p() %>% 
  gtsummary::add_n() %>%
  gtsummary::italicize_levels() %>% 
  gtsummary::bold_labels() %>% 
  gtsummary::modify_caption("**Univariate screen: sample Characteristics by depression (MADRS, baseline)**")
## Warning in checkMatrixPackageVersion(): Package version inconsistency detected.
## TMB was built with Matrix version 1.3.2
## Current Matrix version is 1.2.18
## Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package
## add_global_p: Global p-values for variable(s) `add_global_p(include =
## c("age", "sex", "BMI", "race", "Remission", "BSS_Score_BL", "BSS_Score_1st",
## "BSS_Score_3rd", "MADRS_Score_1st", "MADRS_Score_3rd", "TRP_nM_BL",
## "TRP_nM_1st", "TRP_nM_3rd", "lnSER_BL", "lnSER_1st", "lnSER_3rd",
## "KYN_nM_BL", "KYN_nM_1st", "KYN_nM_3rd", "three_HK_nM_boxcox_BL",
## "three_HK_nM_boxcox_1st", "three_HK_nM_boxcox_3rd", "KYNA_nM_log_BL",
## "KYNA_nM_log_1st", "KYNA_nM_log_3rd", "lnPIC_BL", "lnPIC_1st", "lnPIC_3rd",
## "Quin_nM_BL", "Quin_nM_1st", "Quin_nM_3rd", "lnAA_BL", "lnAA_1st", "lnAA_3rd",
## "NIC_nM_LLOD_log_BL", "NIC_nM_LLOD_log_1st", "NIC_nM_LLOD_log_3rd",
## "NTA_nM_sqrt_BL", "NTA_nM_sqrt_1st", "NTA_nM_sqrt_3rd", "SAA_ng_mL_log_BL",
## "SAA_ng_mL_log_1st", "SAA_ng_mL_log_3rd", "lnVCAM_BL", "lnVCAM_1st",
## "lnVCAM_3rd", "lnICAM_BL", "lnICAM_1st", "lnICAM_3rd", "IL1B_pg_mL_log_BL",
## "IL1B_pg_mL_log_1st", "IL1B_pg_mL_log_3rd", "IL1B_pg_mL_LLOD_log_BL",
## "IL1B_pg_mL_LLOD_log_1st", "IL1B_pg_mL_LLOD_log_3rd", "IL2_pg_mL_BL",
## "IL2_pg_mL_1st", "IL2_pg_mL_3rd", "IL4_pg_mL_log_BL", "IL4_pg_mL_log_1st",
## "IL4_pg_mL_log_3rd", "IL4_pg_mL_LLOD_log_BL", "IL4_pg_mL_LLOD_log_1st",
## "IL4_pg_mL_LLOD_log_3rd", "IL6_pg_mL_log_BL", "IL6_pg_mL_log_1st",
## "IL6_pg_mL_log_3rd", "IL8_pg_mL_log_BL", "IL8_pg_mL_log_1st",
## "IL8_pg_mL_log_3rd", "IL10_pg_mL_BL", "IL10_pg_mL_1st", "IL10_pg_mL_3rd",
## "IL12p70_pg_mL_BL", "IL12p70_pg_mL_1st", "IL12p70_pg_mL_3rd",
## "IL12p70_pg_mL_LLOD_BL", "IL12p70_pg_mL_LLOD_1st", "IL12p70_pg_mL_LLOD_3rd",
## "IL13_pg_mL_BL", "IL13_pg_mL_1st", "IL13_pg_mL_3rd", "IL13_pg_mL_LLOD_BL",
## "IL13_pg_mL_LLOD_1st", "IL13_pg_mL_LLOD_3rd", "TNFa_pg_mL_sqrt_BL",
## "TNFa_pg_mL_sqrt_1st", "TNFa_pg_mL_sqrt_3rd", "IFNy_pg_mL_boxcox_BL",
## "IFNy_pg_mL_boxcox_1st", "IFNy_pg_mL_boxcox_3rd", "CRP_ng_mL_log_BL",
## "CRP_ng_mL_log_1st", "CRP_ng_mL_log_3rd"))` were calculated with
##   `car::Anova(mod = x$model_obj, type = "III")`
Univariate screen: sample Characteristics by depression (MADRS, baseline)
Characteristic N Beta 95% CI1 p-value
age 73 -0.10 -0.20, 0.01 0.068
sex 73 0.2
male
female 1.9 -0.95, 4.7
BMI 73 -0.03 -0.27, 0.22 0.8
race 73 0.7
asian
black 2.0 -12, 16
white -1.2 -13, 11
Remission 72 0.2
No remission
Remitter -2.1 -4.9, 0.77
BSS_Score_BL 73 0.12 -0.05, 0.29 0.2
BSS_Score_1st 68 0.38 0.13, 0.63 0.003
BSS_Score_3rd 68 0.15 -0.18, 0.49 0.4
MADRS_Score_1st 70 0.19 0.00, 0.38 0.053
MADRS_Score_3rd 70 0.21 0.02, 0.40 0.030
TRP_nM_BL 73 0.00 0.00, 0.00 0.6
TRP_nM_1st 70 0.00 0.00, 0.00 0.3
TRP_nM_3rd 71 0.00 0.00, 0.00 0.4
lnSER_BL 73 -0.63 -1.6, 0.30 0.2
lnSER_1st 70 -0.78 -1.8, 0.19 0.11
lnSER_3rd 71 -0.33 -1.2, 0.56 0.5
KYN_nM_BL 73 0.00 -0.01, 0.00 0.8
KYN_nM_1st 70 0.00 -0.01, 0.00 0.5
KYN_nM_3rd 71 0.00 -0.01, 0.00 0.8
three_HK_nM_boxcox_BL 73 -1.7 -46, 43 >0.9
three_HK_nM_boxcox_1st 70 -3.7 -49, 42 0.9
three_HK_nM_boxcox_3rd 71 19 -29, 66 0.4
KYNA_nM_log_BL 73 -2.4 -5.6, 0.82 0.14
KYNA_nM_log_1st 70 -3.1 -6.9, 0.69 0.11
KYNA_nM_log_3rd 71 -0.66 -4.1, 2.8 0.7
lnPIC_BL 73 -2.0 -4.7, 0.73 0.15
lnPIC_1st 70 -1.7 -5.3, 1.9 0.4
lnPIC_3rd 71 -1.2 -4.3, 1.9 0.4
Quin_nM_BL 73 0.00 -0.03, 0.03 >0.9
Quin_nM_1st 70 -0.01 -0.04, 0.03 0.7
Quin_nM_3rd 71 0.00 -0.03, 0.03 0.9
lnAA_BL 73 -1.9 -5.0, 1.2 0.2
lnAA_1st 70 -0.77 -4.2, 2.7 0.7
lnAA_3rd 71 -1.7 -5.1, 1.6 0.3
NIC_nM_LLOD_log_BL 73 0.26 -0.63, 1.1 0.6
NIC_nM_LLOD_log_1st 70 0.05 -0.86, 1.0 >0.9
NIC_nM_LLOD_log_3rd 71 -0.05 -1.0, 0.92 >0.9
NTA_nM_sqrt_BL 73 -0.18 -0.47, 0.11 0.2
NTA_nM_sqrt_1st 70 -0.37 -0.70, -0.04 0.030
NTA_nM_sqrt_3rd 71 -0.09 -0.41, 0.24 0.6
SAA_ng_mL_log_BL 73 0.05 -0.02, 0.12 0.2
SAA_ng_mL_log_1st 70 0.02 -0.06, 0.09 0.7
SAA_ng_mL_log_3rd 71 0.06 -0.02, 0.14 0.2
lnVCAM_BL 73 -2.7 -8.9, 3.5 0.4
lnVCAM_1st 70 -5.6 -12, 0.61 0.076
lnVCAM_3rd 71 -4.4 -10, 1.3 0.13
lnICAM_BL 73 5.5 0.29, 11 0.039
lnICAM_1st 70 3.3 -2.2, 8.8 0.2
lnICAM_3rd 71 3.1 -2.0, 8.2 0.2
IL1B_pg_mL_log_BL 73 -1.5 -8.8, 5.7 0.7
IL1B_pg_mL_log_1st 70 1.7 -12, 15 0.8
IL1B_pg_mL_log_3rd 71 -0.63 -6.0, 4.8 0.8
IL1B_pg_mL_LLOD_log_BL 73 -1.5 -8.8, 5.7 0.7
IL1B_pg_mL_LLOD_log_1st 70 1.7 -12, 15 0.8
IL1B_pg_mL_LLOD_log_3rd 71 -0.63 -6.0, 4.8 0.8
IL2_pg_mL_BL 45 0.13 -0.16, 0.42 0.4
IL2_pg_mL_1st 50 0.16 -0.16, 0.47 0.3
IL2_pg_mL_3rd 53 0.14 -0.15, 0.43 0.3
IL4_pg_mL_log_BL 73 -3.4 -7.4, 0.64 0.10
IL4_pg_mL_log_1st 69 -1.8 -6.0, 2.4 0.4
IL4_pg_mL_log_3rd 71 -2.1 -7.0, 2.8 0.4
IL4_pg_mL_LLOD_log_BL 73 -3.4 -7.4, 0.64 0.10
IL4_pg_mL_LLOD_log_1st 70 -1.8 -4.6, 1.0 0.2
IL4_pg_mL_LLOD_log_3rd 71 -2.1 -7.0, 2.8 0.4
IL6_pg_mL_log_BL 73 0.26 -2.8, 3.3 0.9
IL6_pg_mL_log_1st 70 -0.48 -3.2, 2.3 0.7
IL6_pg_mL_log_3rd 71 1.9 -1.3, 5.2 0.2
IL8_pg_mL_log_BL 73 -3.6 -6.8, -0.30 0.033
IL8_pg_mL_log_1st 70 -4.1 -7.8, -0.40 0.030
IL8_pg_mL_log_3rd 71 -2.2 -6.2, 1.8 0.3
IL10_pg_mL_BL 73 -0.07 -0.71, 0.56 0.8
IL10_pg_mL_1st 70 -0.05 -0.76, 0.66 0.9
IL10_pg_mL_3rd 71 -0.08 -0.87, 0.70 0.8
IL12p70_pg_mL_BL 73 0.00 -0.01, 0.00 0.4
IL12p70_pg_mL_1st 69 0.00 -0.02, 0.01 0.4
IL12p70_pg_mL_3rd 71 0.00 -0.01, 0.00 0.4
IL12p70_pg_mL_LLOD_BL 73 0.00 -0.01, 0.00 0.4
IL12p70_pg_mL_LLOD_1st 70 0.00 -0.02, 0.01 0.4
IL12p70_pg_mL_LLOD_3rd 71 0.00 -0.01, 0.00 0.4
IL13_pg_mL_BL 72 -0.05 -0.17, 0.06 0.3
IL13_pg_mL_1st 68 -0.05 -0.18, 0.07 0.4
IL13_pg_mL_3rd 71 -0.05 -0.16, 0.07 0.4
IL13_pg_mL_LLOD_BL 73 -0.05 -0.17, 0.06 0.4
IL13_pg_mL_LLOD_1st 70 -0.06 -0.19, 0.07 0.3
IL13_pg_mL_LLOD_3rd 71 -0.05 -0.16, 0.07 0.4
TNFa_pg_mL_sqrt_BL 73 -8.7 -17, -0.59 0.036
TNFa_pg_mL_sqrt_1st 70 -11 -18, -3.1 0.006
TNFa_pg_mL_sqrt_3rd 71 -7.5 -15, 0.34 0.061
IFNy_pg_mL_boxcox_BL 73 4.8 -6.4, 16 0.4
IFNy_pg_mL_boxcox_1st 70 3.4 -7.1, 14 0.5
IFNy_pg_mL_boxcox_3rd 71 7.8 -3.6, 19 0.2
CRP_ng_mL_log_BL 73 0.57 -0.32, 1.5 0.2
CRP_ng_mL_log_1st 70 0.52 -0.41, 1.5 0.3
CRP_ng_mL_log_3rd 71 0.63 -0.31, 1.6 0.2

1 CI = Confidence Interval

Baseline depressive severity is associated with baseline: -Suicidality -depression severity after ketamine infusion 3

Baseline depressive severity is inversely associated with baseline: -Age (trend) -NTA and TNF-alpha

Biok_wide %>%
  dplyr::select(., 
                -patientno,
                -Site_Location_BL,
                -Site_Location_1st,
                -Site_Location_3rd,
                -Sample_ID_BL,
                -Sample_ID_1st,
                -Sample_ID_3rd,
                -Batch_Number_BL,
                -Batch_Number_1st,
                -Batch_Number_3rd) %>%
  gtsummary::tbl_uvregression(method = lm, y= MADRS_Score_3rd) %>%
  gtsummary::add_global_p() %>%
  gtsummary::bold_p() %>% 
  gtsummary::add_n() %>%
  gtsummary::italicize_levels() %>% 
  gtsummary::bold_labels() %>% 
  gtsummary::modify_caption("**Univariate screen: sample Characteristics by depression (MADRS, post-infusion 3)**")
## add_global_p: Global p-values for variable(s) `add_global_p(include =
## c("age", "sex", "BMI", "race", "Remission", "BSS_Score_BL", "BSS_Score_1st",
## "BSS_Score_3rd", "MADRS_Score_BL", "MADRS_Score_1st", "TRP_nM_BL",
## "TRP_nM_1st", "TRP_nM_3rd", "lnSER_BL", "lnSER_1st", "lnSER_3rd",
## "KYN_nM_BL", "KYN_nM_1st", "KYN_nM_3rd", "three_HK_nM_boxcox_BL",
## "three_HK_nM_boxcox_1st", "three_HK_nM_boxcox_3rd", "KYNA_nM_log_BL",
## "KYNA_nM_log_1st", "KYNA_nM_log_3rd", "lnPIC_BL", "lnPIC_1st", "lnPIC_3rd",
## "Quin_nM_BL", "Quin_nM_1st", "Quin_nM_3rd", "lnAA_BL", "lnAA_1st", "lnAA_3rd",
## "NIC_nM_LLOD_log_BL", "NIC_nM_LLOD_log_1st", "NIC_nM_LLOD_log_3rd",
## "NTA_nM_sqrt_BL", "NTA_nM_sqrt_1st", "NTA_nM_sqrt_3rd", "SAA_ng_mL_log_BL",
## "SAA_ng_mL_log_1st", "SAA_ng_mL_log_3rd", "lnVCAM_BL", "lnVCAM_1st",
## "lnVCAM_3rd", "lnICAM_BL", "lnICAM_1st", "lnICAM_3rd", "IL1B_pg_mL_log_BL",
## "IL1B_pg_mL_log_1st", "IL1B_pg_mL_log_3rd", "IL1B_pg_mL_LLOD_log_BL",
## "IL1B_pg_mL_LLOD_log_1st", "IL1B_pg_mL_LLOD_log_3rd", "IL2_pg_mL_BL",
## "IL2_pg_mL_1st", "IL2_pg_mL_3rd", "IL4_pg_mL_log_BL", "IL4_pg_mL_log_1st",
## "IL4_pg_mL_log_3rd", "IL4_pg_mL_LLOD_log_BL", "IL4_pg_mL_LLOD_log_1st",
## "IL4_pg_mL_LLOD_log_3rd", "IL6_pg_mL_log_BL", "IL6_pg_mL_log_1st",
## "IL6_pg_mL_log_3rd", "IL8_pg_mL_log_BL", "IL8_pg_mL_log_1st",
## "IL8_pg_mL_log_3rd", "IL10_pg_mL_BL", "IL10_pg_mL_1st", "IL10_pg_mL_3rd",
## "IL12p70_pg_mL_BL", "IL12p70_pg_mL_1st", "IL12p70_pg_mL_3rd",
## "IL12p70_pg_mL_LLOD_BL", "IL12p70_pg_mL_LLOD_1st", "IL12p70_pg_mL_LLOD_3rd",
## "IL13_pg_mL_BL", "IL13_pg_mL_1st", "IL13_pg_mL_3rd", "IL13_pg_mL_LLOD_BL",
## "IL13_pg_mL_LLOD_1st", "IL13_pg_mL_LLOD_3rd", "TNFa_pg_mL_sqrt_BL",
## "TNFa_pg_mL_sqrt_1st", "TNFa_pg_mL_sqrt_3rd", "IFNy_pg_mL_boxcox_BL",
## "IFNy_pg_mL_boxcox_1st", "IFNy_pg_mL_boxcox_3rd", "CRP_ng_mL_log_BL",
## "CRP_ng_mL_log_1st", "CRP_ng_mL_log_3rd"))` were calculated with
##   `car::Anova(mod = x$model_obj, type = "III")`
Univariate screen: sample Characteristics by depression (MADRS, post-infusion 3)
Characteristic N Beta 95% CI1 p-value
age 72 0.01 -0.13, 0.15 0.8
sex 72 0.4
male
female 1.4 -2.3, 5.1
BMI 72 0.04 -0.29, 0.36 0.8
race 72 0.6
asian
black 11 -11, 33
white 4.9 -11, 20
Remission 72 <0.001
No remission
Remitter -13 -15, -11
BSS_Score_BL 70 0.05 -0.17, 0.28 0.6
BSS_Score_1st 69 0.50 0.20, 0.80 0.001
BSS_Score_3rd 69 0.85 0.50, 1.2 <0.001
MADRS_Score_BL 70 0.32 0.03, 0.61 0.030
MADRS_Score_1st 71 0.64 0.45, 0.83 <0.001
TRP_nM_BL 70 0.00 0.00, 0.00 0.068
TRP_nM_1st 71 0.00 0.00, 0.00 0.2
TRP_nM_3rd 72 0.00 0.00, 0.00 0.088
lnSER_BL 70 1.0 -0.17, 2.1 0.094
lnSER_1st 71 1.0 -0.26, 2.2 0.12
lnSER_3rd 72 1.2 0.06, 2.3 0.039
KYN_nM_BL 70 0.00 0.00, 0.01 0.4
KYN_nM_1st 71 0.00 0.00, 0.01 0.3
KYN_nM_3rd 72 0.01 0.00, 0.01 0.13
three_HK_nM_boxcox_BL 70 -8.3 -68, 51 0.8
three_HK_nM_boxcox_1st 71 4.4 -54, 63 0.9
three_HK_nM_boxcox_3rd 72 21 -42, 85 0.5
KYNA_nM_log_BL 70 -2.3 -6.7, 2.1 0.3
KYNA_nM_log_1st 71 -0.71 -5.9, 4.5 0.8
KYNA_nM_log_3rd 72 -0.95 -5.7, 3.8 0.7
lnPIC_BL 70 -1.1 -4.5, 2.3 0.5
lnPIC_1st 71 2.9 -1.5, 7.3 0.2
lnPIC_3rd 72 0.53 -3.5, 4.6 0.8
Quin_nM_BL 70 -0.03 -0.07, 0.01 0.2
Quin_nM_1st 71 -0.01 -0.05, 0.04 0.8
Quin_nM_3rd 72 -0.02 -0.06, 0.02 0.4
lnAA_BL 70 -4.2 -8.0, -0.37 0.032
lnAA_1st 71 -0.67 -5.0, 3.7 0.8
lnAA_3rd 72 -0.80 -5.3, 3.7 0.7
NIC_nM_LLOD_log_BL 70 -0.01 -1.1, 1.1 >0.9
NIC_nM_LLOD_log_1st 71 -0.47 -1.6, 0.69 0.4
NIC_nM_LLOD_log_3rd 72 0.14 -1.2, 1.4 0.8
NTA_nM_sqrt_BL 70 0.06 -0.32, 0.44 0.7
NTA_nM_sqrt_1st 71 -0.31 -0.74, 0.11 0.15
NTA_nM_sqrt_3rd 72 -0.01 -0.44, 0.43 >0.9
SAA_ng_mL_log_BL 70 0.05 -0.04, 0.14 0.3
SAA_ng_mL_log_1st 71 0.04 -0.05, 0.13 0.4
SAA_ng_mL_log_3rd 72 0.11 0.01, 0.20 0.024
lnVCAM_BL 70 -4.2 -12, 4.1 0.3
lnVCAM_1st 71 1.4 -6.7, 9.4 0.7
lnVCAM_3rd 72 0.01 -7.7, 7.7 >0.9
lnICAM_BL 70 4.2 -2.5, 11 0.2
lnICAM_1st 71 5.2 -1.7, 12 0.14
lnICAM_3rd 72 5.5 -1.3, 12 0.11
IL1B_pg_mL_log_BL 70 1.3 -7.7, 10 0.8
IL1B_pg_mL_log_1st 71 -0.82 -18, 16 >0.9
IL1B_pg_mL_log_3rd 72 -4.2 -11, 2.9 0.2
IL1B_pg_mL_LLOD_log_BL 70 1.3 -7.7, 10 0.8
IL1B_pg_mL_LLOD_log_1st 71 -0.82 -18, 16 >0.9
IL1B_pg_mL_LLOD_log_3rd 72 -4.2 -11, 2.9 0.2
IL2_pg_mL_BL 44 0.26 -0.03, 0.54 0.074
IL2_pg_mL_1st 52 0.29 -0.04, 0.62 0.088
IL2_pg_mL_3rd 55 0.27 -0.06, 0.59 0.11
IL4_pg_mL_log_BL 70 -0.29 -5.5, 4.9 >0.9
IL4_pg_mL_log_1st 70 1.3 -4.1, 6.7 0.6
IL4_pg_mL_log_3rd 72 -0.64 -7.1, 5.8 0.8
IL4_pg_mL_LLOD_log_BL 70 -0.29 -5.5, 4.9 >0.9
IL4_pg_mL_LLOD_log_1st 71 1.8 -1.8, 5.4 0.3
IL4_pg_mL_LLOD_log_3rd 72 -0.64 -7.1, 5.8 0.8
IL6_pg_mL_log_BL 70 -0.54 -4.4, 3.3 0.8
IL6_pg_mL_log_1st 71 1.5 -1.9, 4.9 0.4
IL6_pg_mL_log_3rd 72 1.5 -2.8, 5.8 0.5
IL8_pg_mL_log_BL 70 -2.0 -6.4, 2.3 0.4
IL8_pg_mL_log_1st 71 -3.3 -8.1, 1.5 0.2
IL8_pg_mL_log_3rd 72 1.0 -4.3, 6.3 0.7
IL10_pg_mL_BL 70 -0.53 -1.3, 0.25 0.2
IL10_pg_mL_1st 71 -0.53 -1.4, 0.37 0.2
IL10_pg_mL_3rd 72 -0.61 -1.6, 0.42 0.2
IL12p70_pg_mL_BL 70 0.00 -0.01, 0.01 >0.9
IL12p70_pg_mL_1st 70 0.00 -0.01, 0.01 >0.9
IL12p70_pg_mL_3rd 72 0.00 -0.01, 0.01 >0.9
IL12p70_pg_mL_LLOD_BL 70 0.00 -0.01, 0.01 >0.9
IL12p70_pg_mL_LLOD_1st 71 0.00 -0.01, 0.01 >0.9
IL12p70_pg_mL_LLOD_3rd 72 0.00 -0.01, 0.01 >0.9
IL13_pg_mL_BL 69 0.00 -0.14, 0.14 >0.9
IL13_pg_mL_1st 69 0.00 -0.17, 0.16 >0.9
IL13_pg_mL_3rd 72 0.00 -0.16, 0.15 >0.9
IL13_pg_mL_LLOD_BL 70 0.00 -0.14, 0.14 >0.9
IL13_pg_mL_LLOD_1st 71 0.00 -0.16, 0.17 >0.9
IL13_pg_mL_LLOD_3rd 72 0.00 -0.16, 0.15 >0.9
TNFa_pg_mL_sqrt_BL 70 -2.6 -13, 8.0 0.6
TNFa_pg_mL_sqrt_1st 71 -1.2 -11, 8.9 0.8
TNFa_pg_mL_sqrt_3rd 72 -0.64 -11, 9.9 >0.9
IFNy_pg_mL_boxcox_BL 70 -3.0 -17, 11 0.7
IFNy_pg_mL_boxcox_1st 71 -3.1 -17, 10 0.6
IFNy_pg_mL_boxcox_3rd 72 0.37 -15, 16 >0.9
CRP_ng_mL_log_BL 70 0.28 -0.85, 1.4 0.6
CRP_ng_mL_log_1st 71 0.19 -1.0, 1.4 0.8
CRP_ng_mL_log_3rd 72 0.77 -0.47, 2.0 0.2

1 CI = Confidence Interval

Depression at post-infusion 3 is associated with: -increased depression and suicidality, at both BL and post-infusion 3 -serotonin levels at post-infusion 3 -decreased anthranilic acid level at baseline -Increased SAA level at post-infusion 3 -trends: higher baseline tryptophan, baseline IL2, baseline serotonin

Biok_wide %>%
  dplyr::select(., 
                -patientno,
                -Site_Location_BL,
                -Site_Location_1st,
                -Site_Location_3rd,
                -Sample_ID_BL,
                -Sample_ID_1st,
                -Sample_ID_3rd,
                -Batch_Number_BL,
                -Batch_Number_1st,
                -Batch_Number_3rd) %>%
  gtsummary::tbl_summary(by=Remission) %>%
  gtsummary::add_p(statistic =list(all_continuous() ~ "{mean} ({sd})", 
                                   all_dichotomous() ~ "{p}% ({n})",
                                   digits = all_continuous() ~ 2,
                                   missing_text = "(Missing)"))%>%
  gtsummary::bold_p() %>% 
  gtsummary::add_n() %>%
  gtsummary::italicize_levels() %>% 
  gtsummary::bold_labels() %>% 
  gtsummary::modify_caption("**Univariate screen: sample Characteristics by remission status (post-infusion 3)**")
## 1 observations missing `Remission` have been removed. To include these observations, use `forcats::fct_explicit_na()` on `Remission` column before passing to `tbl_summary()`.
## Warning for variable 'age':
##  simpleWarning in wilcox.test.default(x = c(63, 36, 57, 59, 43, 55, 28, 24, 45, : cannot compute exact p-value with ties
## Warning for variable 'BMI':
##  simpleWarning in wilcox.test.default(x = c(23.4, 25.1, 37.9, 33.4, 46.7, 30.1, : cannot compute exact p-value with ties
## Warning for variable 'BSS_Score_BL':
##  simpleWarning in wilcox.test.default(x = c(12, 15, 4, 2, 10, 27, 13, 25, 6, 14, : cannot compute exact p-value with ties
## Warning for variable 'BSS_Score_1st':
##  simpleWarning in wilcox.test.default(x = c(8, 0, 0, 23, 1, 1, 8, 19, 0, 1, 9, : cannot compute exact p-value with ties
## Warning for variable 'BSS_Score_3rd':
##  simpleWarning in wilcox.test.default(x = c(13, 4, 0, 1, 0, 1, 21, 0, 12, 2, 0, : cannot compute exact p-value with ties
## Warning for variable 'MADRS_Score_BL':
##  simpleWarning in wilcox.test.default(x = c(31, 38, 29, 19, 27, 36, 34, 27, 23, : cannot compute exact p-value with ties
## Warning for variable 'MADRS_Score_1st':
##  simpleWarning in wilcox.test.default(x = c(25, 21, 9, 11, 21, 22, 19, 13, 21, : cannot compute exact p-value with ties
## Warning for variable 'MADRS_Score_3rd':
##  simpleWarning in wilcox.test.default(x = c(28, 26, 15, 21, 10, 20, 15, 12, 15, : cannot compute exact p-value with ties
## Warning for variable 'NIC_nM_LLOD_log_1st':
##  simpleWarning in wilcox.test.default(x = c(1.18711144725052, -1.1294839523352, : cannot compute exact p-value with ties
## Warning for variable 'IL13_pg_mL_LLOD_1st':
##  simpleWarning in wilcox.test.default(x = c(3.170425335, 3.493771076, 4.743641871, : cannot compute exact p-value with ties
Univariate screen: sample Characteristics by remission status (post-infusion 3)
Characteristic N No remission, N = 271 Remitter, N = 471 p-value2
age 74 47 (28, 55) 46 (36, 55) >0.9
sex 74 0.4
male 8 (30%) 19 (40%)
female 19 (70%) 28 (60%)
BMI 74 28.8 (23.4, 32.1) 28.1 (25.1, 31.9) 0.8
race 74 >0.9
asian 0 (0%) 1 (2.1%)
black 1 (3.7%) 1 (2.1%)
white 26 (96%) 45 (96%)
BSS_Score_BL 72 8 (2, 13) 6 (1, 13) 0.3
Unknown 1 1
BSS_Score_1st 69 1.0 (0.0, 8.5) 0.0 (0.0, 0.8) 0.004
Unknown 4 1
BSS_Score_3rd 69 1.0 (0.0, 8.0) 0.0 (0.0, 0.0) <0.001
Unknown 2 3
MADRS_Score_BL 72 28.5 (24.2, 33.0) 27.0 (24.0, 30.0) 0.3
Unknown 1 1
MADRS_Score_1st 71 21 (12, 24) 13 (7, 15) <0.001
Unknown 2 1
MADRS_Score_3rd 72 16 (12, 21) 4 (2, 6) <0.001
Unknown 1 1
TRP_nM_BL 72 27,892 (26,129, 32,035) 28,410 (23,376, 30,356) 0.3
Unknown 1 1
TRP_nM_1st 71 25,316 (21,275, 27,114) 24,536 (19,413, 28,137) 0.7
Unknown 2 1
TRP_nM_3rd 72 25,642 (19,848, 30,055) 22,882 (19,748, 28,685) 0.3
Unknown 1 1
lnSER_BL 72 4.94 (3.65, 6.02) 4.26 (3.38, 5.26) 0.12
Unknown 1 1
lnSER_1st 71 4.57 (3.64, 5.62) 3.80 (3.21, 5.11) 0.2
Unknown 2 1
lnSER_3rd 72 5.20 (3.41, 6.31) 3.78 (3.02, 4.98) 0.024
Unknown 1 1
KYN_nM_BL 72 960 (850, 1,143) 927 (768, 1,178) 0.5
Unknown 1 1
KYN_nM_1st 71 856 (763, 998) 868 (743, 997) >0.9
Unknown 2 1
KYN_nM_3rd 72 854 (759, 1,032) 879 (708, 980) 0.7
Unknown 1 1
three_HK_nM_boxcox_BL 72 1.04 (1.03, 1.06) 1.04 (1.02, 1.06) 0.8
Unknown 1 1
three_HK_nM_boxcox_1st 71 1.035 (1.020, 1.047) 1.033 (1.021, 1.057) >0.9
Unknown 2 1
three_HK_nM_boxcox_3rd 72 1.036 (1.017, 1.053) 1.036 (1.014, 1.060) >0.9
Unknown 1 1
KYNA_nM_log_BL 72 2.95 (2.67, 3.18) 2.99 (2.75, 3.24) 0.9
Unknown 1 1
KYNA_nM_log_1st 71 2.89 (2.73, 3.07) 2.97 (2.65, 3.18) 0.5
Unknown 2 1
KYNA_nM_log_3rd 72 2.83 (2.60, 3.09) 2.89 (2.65, 3.18) 0.5
Unknown 1 1
lnPIC_BL 72 2.88 (2.65, 3.16) 2.84 (2.51, 3.20) 0.8
Unknown 1 1
lnPIC_1st 71 2.77 (2.59, 3.03) 2.74 (2.49, 3.10) 0.7
Unknown 2 1
lnPIC_3rd 72 2.88 (2.47, 3.10) 2.84 (2.60, 3.12) 0.8
Unknown 1 1
Quin_nM_BL 72 141 (107, 161) 145 (118, 177) 0.4
Unknown 1 1
Quin_nM_1st 71 133 (112, 162) 138 (102, 177) 0.8
Unknown 2 1
Quin_nM_3rd 72 130 (113, 155) 157 (116, 181) 0.2
Unknown 1 1
lnAA_BL 72 1.56 (1.44, 1.76) 1.72 (1.50, 2.00) 0.035
Unknown 1 1
lnAA_1st 71 1.63 (1.37, 1.87) 1.69 (1.43, 2.00) 0.4
Unknown 2 1
lnAA_3rd 72 1.64 (1.45, 1.87) 1.63 (1.40, 1.96) 0.9
Unknown 1 1
NIC_nM_LLOD_log_BL 72 -0.54 (-1.12, -0.23) -0.67 (-1.13, 0.08) >0.9
Unknown 1 1
NIC_nM_LLOD_log_1st 71 -0.86 (-1.07, -0.46) -0.47 (-0.98, 0.57) 0.12
Unknown 2 1
NIC_nM_LLOD_log_3rd 72 -0.67 (-1.04, 0.08) -0.74 (-1.11, -0.07) 0.5
Unknown 1 1
NTA_nM_sqrt_BL 72 17.3 (14.8, 19.4) 17.3 (14.2, 21.7) 0.6
Unknown 1 1
NTA_nM_sqrt_1st 71 15.6 (13.1, 17.4) 17.8 (14.1, 20.6) 0.10
Unknown 2 1
NTA_nM_sqrt_3rd 72 17.2 (15.3, 18.0) 15.7 (13.0, 18.4) 0.3
Unknown 1 1
SAA_ng_mL_log_BL 72 54 (44, 65) 42 (35, 61) 0.15
Unknown 1 1
SAA_ng_mL_log_1st 71 50 (40, 62) 42 (34, 63) 0.4
Unknown 2 1
SAA_ng_mL_log_3rd 72 46 (38, 69) 45 (35, 64) 0.5
Unknown 1 1
lnVCAM_BL 72 5.71 (5.59, 5.86) 5.73 (5.60, 5.89) 0.5
Unknown 1 1
lnVCAM_1st 71 5.72 (5.56, 5.88) 5.73 (5.56, 5.88) >0.9
Unknown 2 1
lnVCAM_3rd 72 5.75 (5.62, 5.85) 5.69 (5.52, 5.85) 0.6
Unknown 1 1
lnICAM_BL 72 5.76 (5.56, 5.98) 5.68 (5.56, 5.84) 0.2
Unknown 1 1
lnICAM_1st 71 5.67 (5.57, 5.92) 5.65 (5.52, 5.85) 0.4
Unknown 2 1
lnICAM_3rd 72 5.70 (5.57, 5.90) 5.64 (5.51, 5.81) 0.15
Unknown 1 1
IL1B_pg_mL_log_BL 72 0.6
-1.12936028423984 25 (96%) 45 (98%)
-0.885288513121754 0 (0%) 1 (2.2%)
0.473671672492252 1 (3.8%) 0 (0%)
Unknown 1 1
IL1B_pg_mL_log_1st 71 0.6
-1.12936028423984 24 (96%) 45 (98%)
-0.560070844958166 0 (0%) 1 (2.2%)
-0.442332943131407 1 (4.0%) 0 (0%)
Unknown 2 1
IL1B_pg_mL_log_3rd 72 0.7
-1.12936028423984 25 (96%) 44 (96%)
-1.08675143155781 1 (3.8%) 0 (0%)
-0.813372591137231 0 (0%) 1 (2.2%)
1.00177015061474 0 (0%) 1 (2.2%)
Unknown 1 1
IL1B_pg_mL_LLOD_log_BL 72 0.6
-1.12936028423984 25 (96%) 45 (98%)
-0.885288513121754 0 (0%) 1 (2.2%)
0.473671672492252 1 (3.8%) 0 (0%)
Unknown 1 1
IL1B_pg_mL_LLOD_log_1st 71 0.6
-1.12936028423984 24 (96%) 45 (98%)
-0.560070844958166 0 (0%) 1 (2.2%)
-0.442332943131407 1 (4.0%) 0 (0%)
Unknown 2 1
IL1B_pg_mL_LLOD_log_3rd 72 0.7
-1.12936028423984 25 (96%) 44 (96%)
-1.08675143155781 1 (3.8%) 0 (0%)
-0.813372591137231 0 (0%) 1 (2.2%)
1.00177015061474 0 (0%) 1 (2.2%)
Unknown 1 1
IL2_pg_mL_BL 45 0.47 (0.30, 0.61) 0.38 (0.30, 0.66) >0.9
Unknown 11 18
IL2_pg_mL_1st 52 0.40 (0.25, 0.53) 0.37 (0.28, 0.49) 0.8
Unknown 9 13
IL2_pg_mL_3rd 55 0.37 (0.29, 0.61) 0.39 (0.29, 0.50) 0.7
Unknown 9 10
IL4_pg_mL_log_BL 72 -2.44 (-2.60, -2.26) -2.47 (-2.67, -2.31) 0.8
Unknown 1 1
IL4_pg_mL_log_1st 70 -2.48 (-2.64, -2.19) -2.41 (-2.74, -2.29) 0.6
Unknown 2 2
IL4_pg_mL_log_3rd 72 -2.47 (-2.65, -2.22) -2.45 (-2.62, -2.28) 0.8
Unknown 1 1
IL4_pg_mL_LLOD_log_BL 72 -2.44 (-2.60, -2.26) -2.47 (-2.67, -2.31) 0.8
Unknown 1 1
IL4_pg_mL_LLOD_log_1st 71 -2.48 (-2.64, -2.19) -2.46 (-2.74, -2.30) 0.5
Unknown 2 1
IL4_pg_mL_LLOD_log_3rd 72 -2.47 (-2.65, -2.22) -2.45 (-2.62, -2.28) 0.8
Unknown 1 1
IL6_pg_mL_log_BL 72 -0.07 (-0.39, 0.18) -0.20 (-0.37, 0.16) >0.9
Unknown 1 1
IL6_pg_mL_log_1st 71 0.09 (-0.11, 0.44) -0.11 (-0.46, 0.23) 0.14
Unknown 2 1
IL6_pg_mL_log_3rd 72 -0.05 (-0.39, 0.20) -0.26 (-0.46, 0.09) 0.3
Unknown 1 1
IL8_pg_mL_log_BL 72 1.36 (1.09, 1.65) 1.53 (1.33, 1.66) 0.15
Unknown 1 1
IL8_pg_mL_log_1st 71 1.44 (1.07, 1.66) 1.51 (1.35, 1.71) 0.2
Unknown 2 1
IL8_pg_mL_log_3rd 72 1.38 (1.11, 1.55) 1.32 (1.12, 1.51) 0.7
Unknown 1 1
IL10_pg_mL_BL 72 0.33 (0.29, 0.42) 0.34 (0.26, 0.45) 0.7
Unknown 1 1
IL10_pg_mL_1st 71 0.37 (0.32, 0.42) 0.36 (0.26, 0.46) 0.5
Unknown 2 1
IL10_pg_mL_3rd 72 0.40 (0.34, 0.43) 0.34 (0.26, 0.46) 0.4
Unknown 1 1
IL12p70_pg_mL_BL 72 0.39 (0.33, 0.51) 0.37 (0.26, 0.47) 0.3
Unknown 1 1
IL12p70_pg_mL_1st 70 0.41 (0.33, 0.52) 0.38 (0.30, 0.49) 0.2
Unknown 2 2
IL12p70_pg_mL_3rd 72 0.43 (0.34, 0.48) 0.36 (0.29, 0.49) 0.3
Unknown 1 1
IL12p70_pg_mL_LLOD_BL 72 0.39 (0.33, 0.51) 0.37 (0.26, 0.47) 0.3
Unknown 1 1
IL12p70_pg_mL_LLOD_1st 71 0.41 (0.33, 0.52) 0.37 (0.29, 0.48) 0.14
Unknown 2 1
IL12p70_pg_mL_LLOD_3rd 72 0.43 (0.34, 0.48) 0.36 (0.29, 0.49) 0.3
Unknown 1 1
IL13_pg_mL_BL 71 3.42 (3.08, 3.97) 3.62 (3.24, 4.19) 0.3
Unknown 1 2
IL13_pg_mL_1st 69 3.49 (3.15, 3.94) 3.66 (3.20, 4.24) 0.5
Unknown 2 3
IL13_pg_mL_3rd 72 3.50 (3.13, 4.06) 3.64 (3.24, 3.95) 0.5
Unknown 1 1
IL13_pg_mL_LLOD_BL 72 3.42 (3.08, 3.97) 3.62 (3.18, 4.17) 0.4
Unknown 1 1
IL13_pg_mL_LLOD_1st 71 3.49 (3.15, 3.94) 3.65 (3.14, 4.21) 0.7
Unknown 2 1
IL13_pg_mL_LLOD_3rd 72 3.50 (3.13, 4.06) 3.64 (3.24, 3.95) 0.5
Unknown 1 1
TNFa_pg_mL_sqrt_BL 72 1.14 (1.08, 1.27) 1.19 (1.10, 1.30) 0.4
Unknown 1 1
TNFa_pg_mL_sqrt_1st 71 1.13 (1.07, 1.25) 1.15 (1.09, 1.30) 0.3
Unknown 2 1
TNFa_pg_mL_sqrt_3rd 72 1.15 (1.06, 1.25) 1.16 (1.10, 1.26) 0.5
Unknown 1 1
IFNy_pg_mL_boxcox_BL 72 0.93 (0.86, 1.04) 0.95 (0.88, 1.04) 0.7
Unknown 1 1
IFNy_pg_mL_boxcox_1st 71 0.90 (0.86, 1.00) 0.95 (0.87, 1.03) 0.5
Unknown 2 1
IFNy_pg_mL_boxcox_3rd 72 0.96 (0.89, 1.04) 0.97 (0.89, 1.06) 0.6
Unknown 1 1
CRP_ng_mL_log_BL 72 7.42 (6.75, 8.77) 6.93 (6.06, 7.92) 0.3
Unknown 1 1
CRP_ng_mL_log_1st 71 7.03 (5.97, 8.14) 6.86 (6.23, 7.84) 0.7
Unknown 2 1
CRP_ng_mL_log_3rd 72 7.52 (5.91, 8.04) 6.97 (6.07, 7.80) 0.4
Unknown 1 1

1 Median (IQR); n (%)

2 Wilcoxon rank sum test; Pearson's Chi-squared test; Fisher's exact test

Remission status (MADRS<9) after infusion 3 is associated with: -Lower suicidality at basleine and post-infusion 3 -Lower serotonin levels after infusion 3 -Higher anthranilic acid at baseline -Feint trends: IL4, IL6, IL8, SAA, NIC, NTA

Biok_wide %>%
  dplyr::select(., 
                -patientno,
                -Site_Location_BL,
                -Site_Location_1st,
                -Site_Location_3rd,
                -Sample_ID_BL,
                -Sample_ID_1st,
                -Sample_ID_3rd,
                -Batch_Number_BL,
                -Batch_Number_1st,
                -Batch_Number_3rd) %>%
  gtsummary::tbl_uvregression(method = lm, y= BSS_Score_BL) %>%
  gtsummary::add_global_p() %>%
  gtsummary::bold_p() %>% 
  gtsummary::add_n() %>%
  gtsummary::italicize_levels() %>% 
  gtsummary::bold_labels() %>% 
  gtsummary::modify_caption("**Univariate screen: sample Characteristics by suicidality (BSS, baseline)**")
## add_global_p: Global p-values for variable(s) `add_global_p(include =
## c("age", "sex", "BMI", "race", "Remission", "BSS_Score_1st", "BSS_Score_3rd",
## "MADRS_Score_BL", "MADRS_Score_1st", "MADRS_Score_3rd", "TRP_nM_BL",
## "TRP_nM_1st", "TRP_nM_3rd", "lnSER_BL", "lnSER_1st", "lnSER_3rd",
## "KYN_nM_BL", "KYN_nM_1st", "KYN_nM_3rd", "three_HK_nM_boxcox_BL",
## "three_HK_nM_boxcox_1st", "three_HK_nM_boxcox_3rd", "KYNA_nM_log_BL",
## "KYNA_nM_log_1st", "KYNA_nM_log_3rd", "lnPIC_BL", "lnPIC_1st", "lnPIC_3rd",
## "Quin_nM_BL", "Quin_nM_1st", "Quin_nM_3rd", "lnAA_BL", "lnAA_1st", "lnAA_3rd",
## "NIC_nM_LLOD_log_BL", "NIC_nM_LLOD_log_1st", "NIC_nM_LLOD_log_3rd",
## "NTA_nM_sqrt_BL", "NTA_nM_sqrt_1st", "NTA_nM_sqrt_3rd", "SAA_ng_mL_log_BL",
## "SAA_ng_mL_log_1st", "SAA_ng_mL_log_3rd", "lnVCAM_BL", "lnVCAM_1st",
## "lnVCAM_3rd", "lnICAM_BL", "lnICAM_1st", "lnICAM_3rd", "IL1B_pg_mL_log_BL",
## "IL1B_pg_mL_log_1st", "IL1B_pg_mL_log_3rd", "IL1B_pg_mL_LLOD_log_BL",
## "IL1B_pg_mL_LLOD_log_1st", "IL1B_pg_mL_LLOD_log_3rd", "IL2_pg_mL_BL",
## "IL2_pg_mL_1st", "IL2_pg_mL_3rd", "IL4_pg_mL_log_BL", "IL4_pg_mL_log_1st",
## "IL4_pg_mL_log_3rd", "IL4_pg_mL_LLOD_log_BL", "IL4_pg_mL_LLOD_log_1st",
## "IL4_pg_mL_LLOD_log_3rd", "IL6_pg_mL_log_BL", "IL6_pg_mL_log_1st",
## "IL6_pg_mL_log_3rd", "IL8_pg_mL_log_BL", "IL8_pg_mL_log_1st",
## "IL8_pg_mL_log_3rd", "IL10_pg_mL_BL", "IL10_pg_mL_1st", "IL10_pg_mL_3rd",
## "IL12p70_pg_mL_BL", "IL12p70_pg_mL_1st", "IL12p70_pg_mL_3rd",
## "IL12p70_pg_mL_LLOD_BL", "IL12p70_pg_mL_LLOD_1st", "IL12p70_pg_mL_LLOD_3rd",
## "IL13_pg_mL_BL", "IL13_pg_mL_1st", "IL13_pg_mL_3rd", "IL13_pg_mL_LLOD_BL",
## "IL13_pg_mL_LLOD_1st", "IL13_pg_mL_LLOD_3rd", "TNFa_pg_mL_sqrt_BL",
## "TNFa_pg_mL_sqrt_1st", "TNFa_pg_mL_sqrt_3rd", "IFNy_pg_mL_boxcox_BL",
## "IFNy_pg_mL_boxcox_1st", "IFNy_pg_mL_boxcox_3rd", "CRP_ng_mL_log_BL",
## "CRP_ng_mL_log_1st", "CRP_ng_mL_log_3rd"))` were calculated with
##   `car::Anova(mod = x$model_obj, type = "III")`
Univariate screen: sample Characteristics by suicidality (BSS, baseline)
Characteristic N Beta 95% CI1 p-value
age 73 -0.06 -0.20, 0.09 0.4
sex 73 0.6
male
female -1.1 -5.0, 2.8
BMI 73 -0.06 -0.39, 0.28 0.7
race 73 0.6
asian
black 9.5 -10, 29
white 8.6 -7.5, 25
Remission 72 0.5
No remission
Remitter -1.3 -5.1, 2.5
BSS_Score_1st 68 0.87 0.59, 1.1 <0.001
BSS_Score_3rd 68 0.79 0.37, 1.2 <0.001
MADRS_Score_BL 73 0.23 -0.09, 0.55 0.2
MADRS_Score_1st 70 -0.09 -0.36, 0.18 0.5
MADRS_Score_3rd 70 0.06 -0.20, 0.32 0.6
TRP_nM_BL 73 0.00 0.00, 0.00 0.4
TRP_nM_1st 70 0.00 0.00, 0.00 0.8
TRP_nM_3rd 71 0.00 0.00, 0.00 >0.9
lnSER_BL 73 0.51 -0.78, 1.8 0.4
lnSER_1st 70 0.26 -1.1, 1.6 0.7
lnSER_3rd 71 0.57 -0.66, 1.8 0.4
KYN_nM_BL 73 -0.01 -0.01, 0.00 0.12
KYN_nM_1st 70 -0.01 -0.01, 0.00 0.2
KYN_nM_3rd 71 -0.01 -0.01, 0.00 0.10
three_HK_nM_boxcox_BL 73 -37 -97, 24 0.2
three_HK_nM_boxcox_1st 70 -33 -95, 29 0.3
three_HK_nM_boxcox_3rd 71 -44 -109, 21 0.2
KYNA_nM_log_BL 73 -3.3 -7.7, 1.1 0.14
KYNA_nM_log_1st 70 -1.8 -7.1, 3.5 0.5
KYNA_nM_log_3rd 71 -4.0 -8.6, 0.58 0.085
lnPIC_BL 73 0.58 -3.2, 4.3 0.8
lnPIC_1st 70 3.0 -2.0, 8.0 0.2
lnPIC_3rd 71 -0.80 -5.1, 3.5 0.7
Quin_nM_BL 73 -0.02 -0.06, 0.02 0.3
Quin_nM_1st 70 -0.01 -0.06, 0.04 0.7
Quin_nM_3rd 71 -0.02 -0.06, 0.02 0.3
lnAA_BL 73 -1.5 -5.7, 2.8 0.5
lnAA_1st 70 -1.3 -6.0, 3.4 0.6
lnAA_3rd 71 -1.1 -5.7, 3.6 0.6
NIC_nM_LLOD_log_BL 73 0.56 -0.66, 1.8 0.4
NIC_nM_LLOD_log_1st 70 0.50 -0.76, 1.8 0.4
NIC_nM_LLOD_log_3rd 71 0.57 -0.77, 1.9 0.4
NTA_nM_sqrt_BL 73 -0.19 -0.60, 0.21 0.3
NTA_nM_sqrt_1st 70 -0.34 -0.81, 0.12 0.15
NTA_nM_sqrt_3rd 71 -0.09 -0.54, 0.36 0.7
SAA_ng_mL_log_BL 73 -0.05 -0.14, 0.05 0.4
SAA_ng_mL_log_1st 70 -0.04 -0.14, 0.06 0.5
SAA_ng_mL_log_3rd 71 -0.03 -0.14, 0.08 0.6
lnVCAM_BL 73 1.3 -7.3, 9.8 0.8
lnVCAM_1st 70 2.9 -5.8, 12 0.5
lnVCAM_3rd 71 3.2 -4.8, 11 0.4
lnICAM_BL 73 0.84 -6.6, 8.3 0.8
lnICAM_1st 70 -0.72 -8.4, 6.9 0.9
lnICAM_3rd 71 0.76 -6.4, 7.9 0.8
IL1B_pg_mL_log_BL 73 -2.7 -13, 7.2 0.6
IL1B_pg_mL_log_1st 70 12 -6.0, 30 0.2
IL1B_pg_mL_log_3rd 71 -3.5 -11, 3.9 0.3
IL1B_pg_mL_LLOD_log_BL 73 -2.7 -13, 7.2 0.6
IL1B_pg_mL_LLOD_log_1st 70 12 -6.0, 30 0.2
IL1B_pg_mL_LLOD_log_3rd 71 -3.5 -11, 3.9 0.3
IL2_pg_mL_BL 45 0.12 -0.27, 0.50 0.5
IL2_pg_mL_1st 50 0.12 -0.29, 0.54 0.6
IL2_pg_mL_3rd 53 0.11 -0.27, 0.50 0.6
IL4_pg_mL_log_BL 73 -1.2 -6.8, 4.4 0.7
IL4_pg_mL_log_1st 69 2.8 -3.0, 8.6 0.3
IL4_pg_mL_log_3rd 71 6.7 0.16, 13 0.045
IL4_pg_mL_LLOD_log_BL 73 -1.2 -6.8, 4.4 0.7
IL4_pg_mL_LLOD_log_1st 70 0.77 -3.1, 4.7 0.7
IL4_pg_mL_LLOD_log_3rd 71 6.7 0.16, 13 0.045
IL6_pg_mL_log_BL 73 0.69 -3.5, 4.9 0.7
IL6_pg_mL_log_1st 70 1.0 -2.8, 4.8 0.6
IL6_pg_mL_log_3rd 71 1.9 -2.6, 6.4 0.4
IL8_pg_mL_log_BL 73 -0.87 -5.5, 3.7 0.7
IL8_pg_mL_log_1st 70 -1.5 -6.8, 3.7 0.6
IL8_pg_mL_log_3rd 71 -2.1 -7.7, 3.5 0.5
IL10_pg_mL_BL 73 0.22 -0.65, 1.1 0.6
IL10_pg_mL_1st 70 0.29 -0.68, 1.3 0.5
IL10_pg_mL_3rd 71 0.38 -0.70, 1.5 0.5
IL12p70_pg_mL_BL 73 0.01 0.00, 0.02 0.11
IL12p70_pg_mL_1st 69 0.01 0.00, 0.03 0.11
IL12p70_pg_mL_3rd 71 0.01 0.00, 0.02 0.10
IL12p70_pg_mL_LLOD_BL 73 0.01 0.00, 0.02 0.11
IL12p70_pg_mL_LLOD_1st 70 0.01 0.00, 0.03 0.11
IL12p70_pg_mL_LLOD_3rd 71 0.01 0.00, 0.02 0.10
IL13_pg_mL_BL 72 0.13 -0.02, 0.28 0.094
IL13_pg_mL_1st 68 0.15 -0.02, 0.32 0.079
IL13_pg_mL_3rd 71 0.14 -0.02, 0.29 0.083
IL13_pg_mL_LLOD_BL 73 0.13 -0.03, 0.28 0.11
IL13_pg_mL_LLOD_1st 70 0.14 -0.03, 0.32 0.10
IL13_pg_mL_LLOD_3rd 71 0.14 -0.02, 0.29 0.083
TNFa_pg_mL_sqrt_BL 73 2.7 -8.8, 14 0.6
TNFa_pg_mL_sqrt_1st 70 2.7 -8.3, 14 0.6
TNFa_pg_mL_sqrt_3rd 71 3.8 -7.3, 15 0.5
IFNy_pg_mL_boxcox_BL 73 -2.4 -18, 13 0.8
IFNy_pg_mL_boxcox_1st 70 -1.8 -16, 13 0.8
IFNy_pg_mL_boxcox_3rd 71 -2.3 -18, 14 0.8
CRP_ng_mL_log_BL 73 0.14 -1.1, 1.4 0.8
CRP_ng_mL_log_1st 70 0.08 -1.2, 1.4 0.9
CRP_ng_mL_log_3rd 71 -0.25 -1.6, 1.1 0.7

1 CI = Confidence Interval

Baseline suicidality is associated with -suicidality at post-infusion 3 -IL4 at post-ketamine infusion 3

model<-lm(MADRS_Score_3rd~sex+age+BMI+race+MADRS_Score_BL*TRP_nM_BL+TRP_nM_BL+lnSER_BL+lnAA_BL, data=Biok_wide)
summary(model)
## 
## Call:
## lm(formula = MADRS_Score_3rd ~ sex + age + BMI + race + MADRS_Score_BL * 
##     TRP_nM_BL + TRP_nM_BL + lnSER_BL + lnAA_BL, data = Biok_wide)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.3376 -4.3554 -0.5433  3.2536 14.1170 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)   
## (Intercept)               4.295e+01  2.235e+01   1.922   0.0595 . 
## sexfemale                 3.870e+00  1.695e+00   2.283   0.0260 * 
## age                       5.106e-02  6.377e-02   0.801   0.4266   
## BMI                       1.967e-01  1.490e-01   1.320   0.1921   
## raceblack                 2.657e+00  9.404e+00   0.283   0.7785   
## racewhite                -2.360e+00  6.658e+00  -0.354   0.7243   
## MADRS_Score_BL           -1.830e+00  7.455e-01  -2.456   0.0170 * 
## TRP_nM_BL                -1.691e-03  7.109e-04  -2.379   0.0206 * 
## lnSER_BL                  1.088e+00  5.368e-01   2.026   0.0473 * 
## lnAA_BL                  -4.995e+00  1.897e+00  -2.633   0.0108 * 
## MADRS_Score_BL:TRP_nM_BL  7.645e-05  2.640e-05   2.895   0.0053 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.17 on 59 degrees of freedom
##   (5 observations deleted due to missingness)
## Multiple R-squared:  0.3641, Adjusted R-squared:  0.2563 
## F-statistic: 3.378 on 10 and 59 DF,  p-value: 0.001545
reg_cohend <- function (glm_output) {
  beta <- summary(glm_output)$coefficients[,1]
  SD <- sqrt(dim(glm_output$model)[1])*summary(glm_output)$coefficients[,2]
  cohend <- round(beta/SD,3)
  return(cohend)
}


reg_cohend(model)
##              (Intercept)                sexfemale                      age 
##                    0.230                    0.273                    0.096 
##                      BMI             raceblack                racewhite    
##                    0.158                    0.034                   -0.042 
##           MADRS_Score_BL                TRP_nM_BL                 lnSER_BL 
##                   -0.293                   -0.284                    0.242 
##                  lnAA_BL MADRS_Score_BL:TRP_nM_BL 
##                   -0.315                    0.346

After adjusting for demographic factors and pre-treatment depressive severity, Modelling depression severity (MADRS total score, post-infusion #3) by baseline characteristics, adjusting for demographics, relevant covariates and interactions. Post-treatment depression levels were “predicted” by: -female sex -lower depressive severity (main effect) -lower tryptophan levels (main effect) -higher depressive severity under conditions of high tryptophan (interaction effect) -higher baseline serotonin levels -lower baseline anthranilic acid levels

Note: this model doesnt include KP metabolite ratios yet.

Biok_wide$Remission<-relevel(Biok_wide$Remission, ref="No remission")

model<-glm(Remission~sex+age+BMI+race+MADRS_Score_BL*TRP_nM_BL+lnAA_BL,family="binomial", data=Biok_wide)
summary(model)
## 
## Call:
## glm(formula = Remission ~ sex + age + BMI + race + MADRS_Score_BL * 
##     TRP_nM_BL + lnAA_BL, family = "binomial", data = Biok_wide)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.0383  -1.0070   0.4478   0.8955   1.5816  
## 
## Coefficients:
##                            Estimate Std. Error z value Pr(>|z|)   
## (Intercept)              -1.303e+00  1.455e+03  -0.001  0.99929   
## sexfemale                -1.168e+00  7.079e-01  -1.650  0.09890 . 
## age                      -2.369e-02  2.629e-02  -0.901  0.36754   
## BMI                      -4.496e-02  5.535e-02  -0.812  0.41655   
## raceblack                -1.370e+01  1.455e+03  -0.009  0.99249   
## racewhite                -1.359e+01  1.455e+03  -0.009  0.99255   
## MADRS_Score_BL            6.242e-01  3.403e-01   1.834  0.06661 . 
## TRP_nM_BL                 5.508e-04  3.217e-04   1.712  0.08690 . 
## lnAA_BL                   2.981e+00  1.112e+00   2.681  0.00734 **
## MADRS_Score_BL:TRP_nM_BL -2.462e-05  1.241e-05  -1.983  0.04732 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 94.184  on 71  degrees of freedom
## Residual deviance: 75.494  on 62  degrees of freedom
##   (3 observations deleted due to missingness)
## AIC: 95.494
## 
## Number of Fisher Scoring iterations: 14
reg_cohend(model)
##              (Intercept)                sexfemale                      age 
##                    0.000                   -0.194                   -0.106 
##                      BMI             raceblack                racewhite    
##                   -0.096                   -0.001                   -0.001 
##           MADRS_Score_BL                TRP_nM_BL                  lnAA_BL 
##                    0.216                    0.202                    0.316 
## MADRS_Score_BL:TRP_nM_BL 
##                   -0.234

Rough model of remission according to baseline factors, adjusted by demo, clinical covariates and interactions. Oddly, the effects seem reversed: -Male sex trends with remission -Higher baseline depression trends with remission status (main effects), except in conditions of lower tryptophan (interaction) -higher baseline anthranilic acid discriminates remitters from non-remitters

Im not sure this makes sense, considering the linear model before this…