Introduction
This report presents an open-access statistical analysis of OuTSMART
DSA Positive Database.
Install Packages and load their libraries
options(repos = c(CRAN = "https://cloud.r-project.org/"))
install.packages('dplyr')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages('knitr')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages('tinytex')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages('mosaic')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages('skimr')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages('tidyverse')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages('ggplot2')
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages("survminer")
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
install.packages("tidyr")
##
## The downloaded binary packages are in
## /var/folders/x5/w2s472sd0fj2bhz916d7xzl00000gn/T//RtmpUdNSFI/downloaded_packages
library(tidyr)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ purrr 1.0.2
## ✔ forcats 1.0.0 ✔ readr 2.1.5
## ✔ ggplot2 3.5.1 ✔ stringr 1.5.1
## ✔ lubridate 1.9.3 ✔ tibble 3.2.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dplyr)
library(skimr)
library(survival)
## Warning: package 'survival' was built under R version 4.3.3
library(tinytex)
## Warning: package 'tinytex' was built under R version 4.3.3
library(ggplot2)
library(mosaic)
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Attaching package: 'mosaic'
##
## The following object is masked from 'package:Matrix':
##
## mean
##
## The following object is masked from 'package:skimr':
##
## n_missing
##
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
##
## The following object is masked from 'package:purrr':
##
## cross
##
## The following object is masked from 'package:ggplot2':
##
## stat
##
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
## quantile, sd, t.test, var
##
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
library(survminer)
## Warning: package 'survminer' was built under R version 4.3.3
## Loading required package: ggpubr
##
## Attaching package: 'survminer'
##
## The following object is masked from 'package:survival':
##
## myeloma
Load the dataset, where v5 is the data
setwd("~/Documents/ACF:PhD/OUTSMART DATA FILTERED")
HLAv5<- read.csv("~/Documents/ACF:PhD/OUTSMART DATA FILTERED/HLAv5.csv")
v5<-HLAv5
summary(v5)
## Label DSA.opsitive.at.randomisation. DSA.positive.at.rescreen.
## Length:132 Min. :1 Min. :1
## Class :character 1st Qu.:1 1st Qu.:1
## Mode :character Median :1 Median :1
## Mean :1 Mean :1
## 3rd Qu.:1 3rd Qu.:1
## Max. :1 Max. :1
##
## DSA_End ABMR REG_01 AGE
## Min. :0.000 Min. :0.00000 Length:132 Min. :27.00
## 1st Qu.:0.000 1st Qu.:0.00000 Class :character 1st Qu.:47.00
## Median :0.000 Median :0.00000 Mode :character Median :56.00
## Mean :0.553 Mean :0.06818 Mean :55.57
## 3rd Qu.:1.000 3rd Qu.:0.00000 3rd Qu.:65.00
## Max. :2.000 Max. :1.00000 Max. :81.00
##
## REG_02 REG_04 RAN_05 MEDH_01
## Min. :0.0000 Min. :0.000 Min. :1.000 Min. : 0.00
## 1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.: 0.00
## Median :0.0000 Median :2.000 Median :1.000 Median : 1.00
## Mean :0.2652 Mean :1.636 Mean :1.477 Mean : 12.39
## 3rd Qu.:1.0000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.: 1.00
## Max. :1.0000 Max. :4.000 Max. :2.000 Max. :777.00
##
## MEDH_02 MEDH_03 MEDH_04 MEDH_05
## Min. : 0.00 Min. : 0.0 Min. : 0.00 Min. : 0.00
## 1st Qu.: 0.00 1st Qu.: 0.0 1st Qu.: 0.00 1st Qu.: 0.00
## Median : 0.00 Median : 0.0 Median : 0.00 Median : 0.00
## Mean : 11.86 Mean : 11.8 Mean : 11.95 Mean : 12.23
## 3rd Qu.: 0.00 3rd Qu.: 0.0 3rd Qu.: 0.00 3rd Qu.: 1.00
## Max. :777.00 Max. :777.0 Max. :777.00 Max. :777.00
##
## MEDH_06 MEDH_07 MEDH_08 MEDH_09
## Min. : 0.00 Min. : 0.00 Min. : 0.00 Min. : 0.00
## 1st Qu.: 0.00 1st Qu.: 0.00 1st Qu.: 0.00 1st Qu.: 0.00
## Median : 0.00 Median : 0.00 Median : 0.00 Median : 0.00
## Mean : 12.08 Mean : 11.84 Mean : 12.06 Mean : 11.84
## 3rd Qu.: 1.00 3rd Qu.: 0.00 3rd Qu.: 1.00 3rd Qu.: 0.00
## Max. :777.00 Max. :777.00 Max. :777.00 Max. :777.00
##
## MEDH_10 MEDH_11 MEDH_12 MEDH_13
## Min. : 0.00 Min. : 0.00 Min. : 0.00 Min. : 0.00
## 1st Qu.: 0.00 1st Qu.: 0.00 1st Qu.: 0.00 1st Qu.: 0.00
## Median : 0.00 Median : 0.00 Median : 0.00 Median : 0.00
## Mean : 11.89 Mean : 11.81 Mean : 11.83 Mean : 11.93
## 3rd Qu.: 0.00 3rd Qu.: 0.00 3rd Qu.: 0.00 3rd Qu.: 0.00
## Max. :777.00 Max. :777.00 Max. :777.00 Max. :777.00
##
## MEDH_14 MEDH_15 MEDH_16 MEDH_17
## Min. : 0.00 Min. : 0.00 Min. : 0.00 Min. : 0.00
## 1st Qu.: 0.00 1st Qu.: 0.00 1st Qu.: 0.00 1st Qu.: 0.00
## Median : 0.00 Median : 0.00 Median : 0.00 Median : 0.00
## Mean : 11.83 Mean : 11.84 Mean : 11.83 Mean : 11.96
## 3rd Qu.: 0.00 3rd Qu.: 0.00 3rd Qu.: 0.00 3rd Qu.: 0.00
## Max. :777.00 Max. :777.00 Max. :777.00 Max. :777.00
##
## IMM_01 IMM_02 IMM_03 IMM_04
## Min. :0.0000 Min. : 31.00 Min. :100.0 Min. :0.0000
## 1st Qu.:0.0000 1st Qu.: 53.25 1st Qu.:140.0 1st Qu.:0.0000
## Median :0.0000 Median : 66.00 Median :180.0 Median :1.0000
## Mean :0.2576 Mean :148.60 Mean :183.4 Mean :0.5909
## 3rd Qu.:1.0000 3rd Qu.: 95.00 3rd Qu.:237.5 3rd Qu.:1.0000
## Max. :1.0000 Max. :999.90 Max. :300.0 Max. :1.0000
## NA's :98 NA's :98
## IMM_05 IMM_06 IMM_07 IMM_08
## Min. : 2.00 Min. : 0.500 Min. :0.00 Min. : 25.00
## 1st Qu.: 4.25 1st Qu.: 2.000 1st Qu.:0.00 1st Qu.: 50.00
## Median : 6.00 Median : 4.000 Median :0.00 Median : 75.00
## Mean : 65.38 Mean : 5.077 Mean :0.25 Mean : 78.03
## 3rd Qu.: 7.75 3rd Qu.: 6.000 3rd Qu.:0.25 3rd Qu.:100.00
## Max. :999.00 Max. :36.000 Max. :1.00 Max. :200.00
## NA's :54 NA's :54 NA's :99
## IMM_09 IMM_10 IMM_11 IMM_12
## Min. :0.0000 Min. : 360 Min. :0.0000 Min. : 0.50
## 1st Qu.:0.0000 1st Qu.: 750 1st Qu.:0.0000 1st Qu.: 5.00
## Median :1.0000 Median :1000 Median :1.0000 Median : 5.00
## Mean :0.6061 Mean :1055 Mean :0.5682 Mean : 4.97
## 3rd Qu.:1.0000 3rd Qu.:1122 3rd Qu.:1.0000 3rd Qu.: 5.00
## Max. :1.0000 Max. :2000 Max. :1.0000 Max. :15.00
## NA's :52 NA's :57
## IMM_13 IMM_14 IMM_15 IMM_16 DIA_01
## Min. :0.00000 Min. :1.000 Min. :0 Mode:logical Min. : 0.0
## 1st Qu.:0.00000 1st Qu.:1.500 1st Qu.:0 NA's:132 1st Qu.: 0.0
## Median :0.00000 Median :2.000 Median :0 Median : 0.0
## Mean :0.05303 Mean :1.857 Mean :0 Mean :300.4
## 3rd Qu.:0.00000 3rd Qu.:2.000 3rd Qu.:0 3rd Qu.:777.0
## Max. :1.00000 Max. :3.000 Max. :0 Max. :777.0
## NA's :125
## WBP_01 WBP_02 WBP_03 BIO_01
## Min. : 40.60 Min. : 95.0 Min. : 46.00 Length:132
## 1st Qu.: 65.05 1st Qu.:121.0 1st Qu.: 72.00 Class :character
## Median : 78.05 Median :132.0 Median : 80.00 Mode :character
## Mean : 78.52 Mean :134.3 Mean : 78.93
## 3rd Qu.: 90.80 3rd Qu.:146.0 3rd Qu.: 85.00
## Max. :125.10 Max. :196.0 Max. :110.00
## NA's :10 NA's :7 NA's :7
## BIO_02 GFR_01 BIO_3 BIO_end
## Min. : 54.0 Min. :22.00 Length:132 Min. : 50.0
## 1st Qu.: 98.0 1st Qu.:41.75 Class :character 1st Qu.:108.5
## Median :125.5 Median :52.50 Mode :character Median :138.5
## Mean :127.7 Mean :53.72 Mean :160.6
## 3rd Qu.:152.0 3rd Qu.:62.00 3rd Qu.:182.5
## Max. :264.0 Max. :93.00 Max. :553.0
##
## GFR_02 UPCR_01 UPCR_02 UPCR_03
## Min. : 9.00 Length:132 Min. :0.0000 Min. : 3.00
## 1st Qu.:33.00 Class :character 1st Qu.:0.0000 1st Qu.: 13.00
## Median :46.00 Mode :character Median :0.0000 Median : 21.00
## Mean :46.27 Mean :0.2273 Mean : 47.95
## 3rd Qu.:59.00 3rd Qu.:0.0000 3rd Qu.: 45.00
## Max. :98.00 Max. :1.0000 Max. :607.00
## NA's :30
## X X.1 UPCR_End TSH_01
## Length:132 Min. :0.0000 Min. : 3.0 Min. : 1.00
## Class :character 1st Qu.:0.0000 1st Qu.: 17.0 1st Qu.: 3.00
## Mode :character Median :0.0000 Median : 28.0 Median : 6.00
## Mean :0.2879 Mean : 141.1 Mean : 92.43
## 3rd Qu.:1.0000 3rd Qu.: 95.0 3rd Qu.: 7.00
## Max. :1.0000 Max. :2960.0 Max. :777.00
## NA's :39
## TSH_02 TSH_03 TSH_04 TSH_05
## Length:132 Length:132 Min. : 0.000 Min. :1.000
## Class :character Class :character 1st Qu.: 0.000 1st Qu.:1.000
## Mode :character Mode :character Median : 0.000 Median :1.000
## Mean : 7.803 Mean :1.129
## 3rd Qu.: 0.000 3rd Qu.:1.000
## Max. :999.000 Max. :2.000
## NA's :101
## TSH_06 TSH_07 GF_01 GF_Date
## Min. : 1.0 Length:132 Min. :0.0000 Length:132
## 1st Qu.: 1.0 Class :character 1st Qu.:0.0000 Class :character
## Median : 5.0 Mode :character Median :0.0000 Mode :character
## Mean :260.2 Mean :0.1136
## 3rd Qu.:502.0 3rd Qu.:0.0000
## Max. :999.0 Max. :1.0000
## NA's :101
## Label.1 Biopsy.1 RBP_01 RBP_02
## Length:132 Min. :0.0000 Length:132 Min. : 1.0
## Class :character 1st Qu.:0.0000 Class :character 1st Qu.: 2.0
## Mode :character Median :0.0000 Mode :character Median : 2.0
## Mean :0.2197 Mean :149.6
## 3rd Qu.:0.0000 3rd Qu.: 2.0
## Max. :1.0000 Max. :888.0
## NA's :105
## RBP_03..2.9.AR.codes RBP_04 RBP_05 RBP_06
## Min. : 1.0 Min. : 2.0 Min. : 20.0 Length:132
## 1st Qu.: 9.0 1st Qu.: 23.0 1st Qu.:777.0 Class :character
## Median : 23.0 Median :777.0 Median :777.0 Mode :character
## Mean :289.3 Mean :493.7 Mean :712.2
## 3rd Qu.:777.0 3rd Qu.:777.0 3rd Qu.:888.0
## Max. :999.0 Max. :999.0 Max. :999.0
## NA's :105 NA's :106 NA's :106
## Label.2 Biopsy.2 RBP_01_2 RBP_02_2
## Length:132 Min. :0.00000 Length:132 Min. :2
## Class :character 1st Qu.:0.00000 Class :character 1st Qu.:2
## Mode :character Median :0.00000 Mode :character Median :2
## Mean :0.06107 Mean :2
## 3rd Qu.:0.00000 3rd Qu.:2
## Max. :2.00000 Max. :2
## NA's :1 NA's :128
## RBP_03_2 RBP_04_2 RBP_05_2 RBP_06_2
## Min. : 4.0 Min. :777.0 Min. :777.0 Length:132
## 1st Qu.: 7.0 1st Qu.:943.5 1st Qu.:943.5 Class :character
## Median : 8.0 Median :999.0 Median :999.0 Mode :character
## Mean :254.8 Mean :943.5 Mean :943.5
## 3rd Qu.:255.8 3rd Qu.:999.0 3rd Qu.:999.0
## Max. :999.0 Max. :999.0 Max. :999.0
## NA's :128 NA's :128 NA's :128
## JUN_01 JUN_02 JUN_03 JUN_04
## Length:132 Min. :1.00 Min. :1 Length:132
## Class :character 1st Qu.:4.00 1st Qu.:1 Class :character
## Mode :character Median :4.00 Median :1 Mode :character
## Mean :3.47 Mean :1
## 3rd Qu.:4.00 3rd Qu.:1
## Max. :4.00 Max. :1
## NA's :116
## JUN_05 PCV_01 PCV_02 PCV_03
## Length:132 Length:132 Min. :1.000 Min. :1
## Class :character Class :character 1st Qu.:4.000 1st Qu.:1
## Mode :character Mode :character Median :4.000 Median :1
## Mean :3.881 Mean :1
## 3rd Qu.:4.000 3rd Qu.:1
## Max. :4.000 Max. :1
## NA's :31 NA's :129
## PCV_04 PCV_05 WD_01 WD_02
## Length:132 Length:132 Min. :0.0000 Length:132
## Class :character Class :character 1st Qu.:0.0000 Class :character
## Mode :character Mode :character Median :0.0000 Mode :character
## Mean :0.2652
## 3rd Qu.:1.0000
## Max. :1.0000
##
## WD_03 WD_03a WD_04 HLA.A
## Min. :1.000 Length:132 Length:132 Min. :0.000
## 1st Qu.:1.500 Class :character Class :character 1st Qu.:1.000
## Median :2.000 Mode :character Mode :character Median :1.000
## Mean :2.429 Mean :1.121
## 3rd Qu.:2.000 3rd Qu.:2.000
## Max. :6.000 Max. :2.000
## NA's :97
## HLA.B HLA.C HLA.DRB1 HLA.DRB3
## Min. :0.000 Min. : 0.0 Min. : 0.000 Min. : 0.00
## 1st Qu.:1.000 1st Qu.: 1.0 1st Qu.: 1.000 1st Qu.: 0.00
## Median :1.000 Median : 1.0 Median : 1.000 Median : 0.00
## Mean :1.152 Mean : 36.6 Mean : 6.818 Mean : 47.26
## 3rd Qu.:2.000 3rd Qu.: 2.0 3rd Qu.: 1.000 3rd Qu.: 0.00
## Max. :2.000 Max. :777.0 Max. :777.000 Max. :777.00
## NA's :1
## HLA.DRB4 HLA.DRB5 HLA.DQA HLA.DQB
## Min. : 0.0 Min. : 0.0 Min. : 0.0 Min. : 0.00
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.:777.0 1st Qu.: 0.00
## Median : 0.0 Median : 0.0 Median :777.0 Median : 1.00
## Mean : 35.5 Mean : 41.3 Mean :652.6 Mean : 47.92
## 3rd Qu.: 0.0 3rd Qu.: 0.0 3rd Qu.:777.0 3rd Qu.: 1.00
## Max. :777.0 Max. :777.0 Max. :777.0 Max. :777.00
## NA's :1
## HLA.DPB Mismatch TX_DSA Start_DSA
## Min. : 0.0 Min. : 0.0 Min. :0.00000 Length:132
## 1st Qu.:777.0 1st Qu.:110.0 1st Qu.:0.00000 Class :character
## Median :777.0 Median :111.0 Median :0.00000 Mode :character
## Mean :688.8 Mean :124.6 Mean :0.09848
## 3rd Qu.:777.0 3rd Qu.:211.0 3rd Qu.:0.00000
## Max. :777.0 Max. :222.0 Max. :1.00000
##
## Hclass_Start Start_MFI Start_DSA2 Hclass_Start2
## Min. :1.000 Length:132 Length:132 Min. :1.000
## 1st Qu.:1.000 Class :character Class :character 1st Qu.:1.000
## Median :2.000 Mode :character Mode :character Median :2.000
## Mean :1.629 Mean :1.654
## 3rd Qu.:2.000 3rd Qu.:2.000
## Max. :4.000 Max. :2.000
## NA's :106
## Start_MFI2 Start_DSA3 Hclass_Start3 Start_MFI3
## Min. : 2102 Length:132 Min. :1.000 Min. :2334
## 1st Qu.: 2770 Class :character 1st Qu.:2.000 1st Qu.:2757
## Median : 4625 Mode :character Median :2.000 Median :3124
## Mean : 7551 Mean :1.857 Mean :4218
## 3rd Qu.:11073 3rd Qu.:2.000 3rd Qu.:5292
## Max. :34991 Max. :2.000 Max. :7972
## NA's :106 NA's :125 NA's :125
## Start_DSA4 Hclass_Start4 Start_MFI4 Start_DSA5
## Length:132 Min. :1.00 Min. : 3523 Length:132
## Class :character 1st Qu.:1.25 1st Qu.: 6712 Class :character
## Mode :character Median :1.50 Median : 9900 Mode :character
## Mean :1.50 Mean : 9900
## 3rd Qu.:1.75 3rd Qu.:13089
## Max. :2.00 Max. :16278
## NA's :130 NA's :130
## Hclass_Start5 Start_MFI5 Mid_DSA Hclass_Mid
## Min. : 1.0 Min. :2367 Length:132 Min. :1.000
## 1st Qu.: 760.8 1st Qu.:2367 Class :character 1st Qu.:1.000
## Median :1520.5 Median :2367 Mode :character Median :2.000
## Mean :1520.5 Mean :2367 Mean :1.706
## 3rd Qu.:2280.2 3rd Qu.:2367 3rd Qu.:2.000
## Max. :3040.0 Max. :2367 Max. :2.000
## NA's :130 NA's :131 NA's :115
## Mid_MFI Mid_DSA2 Hclass_Mid2 Mid_MFI2
## Min. : 2627 Length:132 Min. :1.000 Min. : 2039
## 1st Qu.: 7737 Class :character 1st Qu.:1.500 1st Qu.: 3700
## Median :11128 Mode :character Median :2.000 Median : 5293
## Mean :11858 Mean :1.714 Mean : 8961
## 3rd Qu.:18247 3rd Qu.:2.000 3rd Qu.:13609
## Max. :26113 Max. :2.000 Max. :20778
## NA's :115 NA's :125 NA's :125
## Mid_DSA3 Hclass_Mid3 Mid_MFI3 last_DSA
## Length:132 Min. :1.00 Min. : 3145 Length:132
## Class :character 1st Qu.:1.25 1st Qu.: 7249 Class :character
## Mode :character Median :1.50 Median :11354 Mode :character
## Mean :1.50 Mean :11354
## 3rd Qu.:1.75 3rd Qu.:15458
## Max. :2.00 Max. :19562
## NA's :130 NA's :130
## Hclass_Last Last_MFI last_DSA2 Hclass_Last2
## Min. :1.000 Min. : 5158 Length:132 Min. :1.000
## 1st Qu.:2.000 1st Qu.:10621 Class :character 1st Qu.:2.000
## Median :2.000 Median :12940 Mode :character Median :2.000
## Mean :1.938 Mean :14307 Mean :1.833
## 3rd Qu.:2.000 3rd Qu.:18821 3rd Qu.:2.000
## Max. :2.000 Max. :25207 Max. :2.000
## NA's :116 NA's :116 NA's :126
## Last_MFI2 last_DSA3 Hclass_Last3 Last_MFI3
## Min. : 3658 Length:132 Min. :2 Min. :12605
## 1st Qu.: 7915 Class :character 1st Qu.:2 1st Qu.:12605
## Median :14258 Mode :character Median :2 Median :12605
## Mean :13068 Mean :2 Mean :12605
## 3rd Qu.:18127 3rd Qu.:2 3rd Qu.:12605
## Max. :21019 Max. :2 Max. :12605
## NA's :126 NA's :131 NA's :131
## Dom_Class Other_Class DSA_count total_sMFI
## Min. :1.000 Length:132 Min. :1.000 Length:132
## 1st Qu.:1.000 Class :character 1st Qu.:1.000 Class :character
## Median :2.000 Mode :character Median :1.000 Mode :character
## Mean :1.659 Mean :1.364
## 3rd Qu.:2.000 3rd Qu.:1.000
## Max. :2.000 Max. :5.000
##
## totalmMFI total_eMFI
## Min. : 2627 Min. : 5158
## 1st Qu.: 9835 1st Qu.:11030
## Median :11622 Median :14067
## Mean :16883 Mean :19208
## 3rd Qu.:18247 3rd Qu.:23646
## Max. :47714 Max. :46226
## NA's :115 NA's :116
Display the three main groups by the presscence or abscene of DSA at
the end of the study (DSA_End) (DSA+/+ (1), DSA+/- (0) and
DSA+/Unknown(2))
table(v5$DSA_End)
##
## 0 1 2
## 76 39 17
Determine mean age (AGE) and age range in each DSA category (DSA_End
where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run ANOVA
analysis to determine any statistical differences between groups
v5%>%
group_by(DSA_End)%>%
skim(AGE)
Data summary
| Name |
Piped data |
| Number of rows |
132 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| AGE |
0 |
0 |
1 |
57.14 |
12.35 |
27 |
48.75 |
57.5 |
65.25 |
80 |
▂▆▇▇▆ |
| AGE |
1 |
0 |
1 |
53.67 |
14.33 |
27 |
42.00 |
55.0 |
64.00 |
78 |
▆▂▇▇▅ |
| AGE |
2 |
0 |
1 |
52.88 |
15.82 |
31 |
41.00 |
49.0 |
65.00 |
81 |
▇▇▂▆▃ |
v5%>%
aov(AGE~DSA_End, data=.)%>%
summary()
## Df Sum Sq Mean Sq F value Pr(>F)
## DSA_End 1 411 411.0 2.293 0.132
## Residuals 130 23303 179.3
Determine percentage of men(REG_02 where 0=male and 1=female) in
each DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0) and
DSA+/Unknown(2))) and run chi square/fisher analysis to determine any
statistical differences between groups
v5%>%
dplyr::select(REG_02, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## REG_02 0 1 2
## 0 77.63158 76.92308 47.05882
## 1 22.36842 23.07692 52.94118
v5%>%
dplyr::select(REG_02, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 7.0002, df = 2, p-value = 0.03019
v5%>%
dplyr::select(REG_02, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.04017
## alternative hypothesis: two.sided
Determine percentage of each ethnicity(REG_04 where 0=Asian and
1=Black 2= White 3= Mixed and 4= Other ) in each DSA category (DSA_End
where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi
square/fisher analysis to determine any statistical differences between
groups
v5%>%
dplyr::select(REG_04, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## REG_04 0 1 2
## 0 10.526316 12.820513 17.647059
## 1 19.736842 12.820513 5.882353
## 2 67.105263 74.358974 70.588235
## 3 1.315789 0.000000 0.000000
## 4 1.315789 0.000000 5.882353
v5%>%
dplyr::select(REG_04, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 6.296, df = 8, p-value = 0.6141
v5%>%
dplyr::select(REG_04, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.6032
## alternative hypothesis: two.sided
Determine percentage of patients who are on prednisolone (IMM_11
where 0=not taking pred 1=taking pred ) in each DSA category (DSA_End
where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi square
analysis to determine any statistical differences between groups
v5%>%
dplyr::select(IMM_11, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## IMM_11 0 1 2
## 0 40.78947 48.71795 41.17647
## 1 59.21053 51.28205 58.82353
v5%>%
dplyr::select(IMM_11, DSA_End)%>%
table()%>%
chisq.test()
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 0.69233, df = 2, p-value = 0.7074
Determine percentage of patients who are on tacrolimus(IMM_04 where
0=not taking tac 1=taking tac ) in each DSA category (DSA_End where
(DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi square/fisher
analysis to determine any statistical differences between groups
v5%>%
dplyr::select(IMM_04, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## IMM_04 0 1 2
## 0 35.52632 53.84615 35.29412
## 1 64.47368 46.15385 64.70588
v5%>%
dplyr::select(IMM_04, DSA_End)%>%
table()%>%
chisq.test()
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 3.8328, df = 2, p-value = 0.1471
v5%>%
dplyr::select(IMM_04, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.1583
## alternative hypothesis: two.sided
Determine percentage of patients who are on MMF(IMM_09 where 0=not
taking MMF 1=taking MMF) in each DSA category (DSA_End where (DSA+/+
(1), DSA+/- (0) and DSA+/Unknown(2))) and run chi square/fisher analysis
to determine any statistical differences between groups
v5%>%
dplyr::select(IMM_09, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## IMM_09 0 1 2
## 0 36.84211 41.02564 47.05882
## 1 63.15789 58.97436 52.94118
v5%>%
dplyr::select(IMM_09, DSA_End)%>%
table()%>%
chisq.test()
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 0.6691, df = 2, p-value = 0.7157
v5%>%
dplyr::select(IMM_09, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.7164
## alternative hypothesis: two.sided
Determine percentage of patients who are on Ciclosporin(IMM_01 where
0=not taking ciclo 1=taking ciclo) in each DSA category (DSA_End where
(DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi square/fisher
analysis to determine any statistical differences between groups
v5%>%
dplyr::select(IMM_01, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## IMM_01 0 1 2
## 0 76.31579 66.66667 82.35294
## 1 23.68421 33.33333 17.64706
v5%>%
dplyr::select(IMM_01, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 1.9261, df = 2, p-value = 0.3817
v5%>%
dplyr::select(IMM_01, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.4335
## alternative hypothesis: two.sided
Determine percentage of patients who are on Sirolimus(IMM_13 where
0=not taking sirlimus 1=taking sirolimus) in each DSA category (DSA_End
where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi
square/fisher analysis to determine any statistical differences between
groups
v5%>%
dplyr::select(IMM_13, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## IMM_13 0 1 2
## 0 96.052632 92.307692 94.117647
## 1 3.947368 7.692308 5.882353
v5%>%
dplyr::select(IMM_13, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 0.73284, df = 2, p-value = 0.6932
v5%>%
dplyr::select(IMM_13, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.5433
## alternative hypothesis: two.sided
Determine numner and percentage of patients who have either a 0, 1
or 2 HLA A locus mismatch(HLA.A where 0= 0 mismatch 1= 1 mismatch 2= 2
mismatches) in each DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0)
and DSA+/Unknown(2))) and run chi square/fisher analysis to determine
any statistical differences between groups
v5%>%
dplyr::select(HLA.A, DSA_End)%>%
table()
## DSA_End
## HLA.A 0 1 2
## 0 10 8 5
## 1 43 17 10
## 2 23 14 2
v5%>%
dplyr::select(HLA.A, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## HLA.A 0 1 2
## 0 13.15789 20.51282 29.41176
## 1 56.57895 43.58974 58.82353
## 2 30.26316 35.89744 11.76471
v5%>%
dplyr::select(HLA.A, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 5.7179, df = 4, p-value = 0.2212
v5%>%
dplyr::select(HLA.A, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.1987
## alternative hypothesis: two.sided
Determine number and percentage of patients who have either a 0, 1
or 2 HLA B locus mismatch(‘HLA-B’ where 0= 0 mismatch 1= 1 mismatch 2= 2
mismatches) in each DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0)
and DSA+/Unknown(2))) and run chi square/fisher analysis to determine
any statistical differences between groups
v5%>%
dplyr::select(HLA.B, DSA_End)%>%
table()
## DSA_End
## HLA.B 0 1 2
## 0 11 5 3
## 1 40 22 12
## 2 25 12 2
v5%>%
dplyr::select(HLA.B, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## HLA.B 0 1 2
## 0 14.47368 12.82051 17.64706
## 1 52.63158 56.41026 70.58824
## 2 32.89474 30.76923 11.76471
v5%>%
dplyr::select(HLA.B, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 3.1201, df = 4, p-value = 0.5379
v5%>%
dplyr::select(HLA.B, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.5168
## alternative hypothesis: two.sided
Determine number and percentage of patients who have either a 0, 1
or 2 HLA-DR locus mismatch(HLA.DRB1 where 0= 0 mismatch 1= 1 mismatch 2=
2 mismatches) in each DSA category (DSA_End where (DSA+/+ (1), DSA+/-
(0) and DSA+/Unknown(2))) and run chi square/fisher analysis to
determine any statistical differences between groups
v5%>%
dplyr::select(HLA.DRB1, DSA_End)%>%
table()
## DSA_End
## HLA.DRB1 0 1 2
## 0 22 7 3
## 1 38 27 10
## 2 16 5 3
## 777 0 0 1
v5%>%
dplyr::select(HLA.DRB1, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## HLA.DRB1 0 1 2
## 0 28.947368 17.948718 17.647059
## 1 50.000000 69.230769 58.823529
## 2 21.052632 12.820513 17.647059
## 777 0.000000 0.000000 5.882353
v5%>%
dplyr::select(HLA.DRB1, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 11.056, df = 6, p-value = 0.08666
v5%>%
dplyr::select(HLA.DRB1, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.1937
## alternative hypothesis: two.sided
Determine the percentage of patients who had a DSA present at time
of transplantation(TX_DSA where 0= no DSA 1= DSA present at time of
transplant) in each DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0)
and DSA+/Unknown(2))) and run chi square/fisher analysis to determine
any statistical differences between groups
v5%>%
dplyr::select(TX_DSA, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## TX_DSA 0 1 2
## 0 89.47368 87.17949 100.00000
## 1 10.52632 12.82051 0.00000
v5%>%
dplyr::select(TX_DSA, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 2.2845, df = 2, p-value = 0.3191
v5%>%
dplyr::select(TX_DSA, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.3452
## alternative hypothesis: two.sided
Determine the percentage of patients who were randomised to the
biomarker led group and standard of care group in the OuTSMART
study(RAN_05 where 1= Biomarker led and 2= Standard of care) in each DSA
category (DSA_End where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2)))
and run chi square/fisher analysis to determine any statistical
differences between groups
v5%>%
dplyr::select(RAN_05, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## RAN_05 0 1 2
## 1 51.31579 53.84615 52.94118
## 2 48.68421 46.15385 47.05882
v5%>%
dplyr::select(RAN_05, DSA_End)%>%
table()%>%
chisq.test()
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 0.069641, df = 2, p-value = 0.9658
v5%>%
dplyr::select(RAN_05, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.9684
## alternative hypothesis: two.sided
Determine the mean and range of total MFI at baseline(total_sMFI) in
each DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0) and
DSA+/Unknown(2))) and run ANOVA and Tukey’s HSD analysis
v5$total_sMFI <- as.numeric(v5$total_sMFI)
## Warning: NAs introduced by coercion
v5$DSA_End<-as.factor(v5$DSA_End)
v5%>%
tidyr::drop_na(total_sMFI)%>%
group_by(DSA_End)%>%
skim(total_sMFI)
Data summary
| Name |
Piped data |
| Number of rows |
131 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| total_sMFI |
0 |
0 |
1 |
6518.33 |
6249.12 |
2082 |
2943.5 |
4370.5 |
6774.25 |
37857 |
▇▂▁▁▁ |
| total_sMFI |
1 |
0 |
1 |
11567.74 |
7091.87 |
2574 |
7413.0 |
9531.0 |
12813.50 |
33200 |
▆▇▂▁▁ |
| total_sMFI |
2 |
0 |
1 |
8925.75 |
7082.83 |
3076 |
4340.5 |
5574.5 |
11191.75 |
29970 |
▇▃▂▁▁ |
v5%>%
tidyr::drop_na(total_sMFI)%>%
aov(total_sMFI ~ DSA_End, data =.)%>%
summary()
## Df Sum Sq Mean Sq F value Pr(>F)
## DSA_End 2 6.639e+08 331965767 7.598 0.000762 ***
## Residuals 128 5.593e+09 43691872
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
v5%>%
tidyr::drop_na(total_sMFI)%>%
aov(total_sMFI ~ DSA_End, data =.)%>%
TukeyHSD()
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = total_sMFI ~ DSA_End, data = .)
##
## $DSA_End
## diff lwr upr p adj
## 1-0 5049.415 1962.001 8136.828 0.0004887
## 2-0 2407.421 -1903.917 6718.759 0.3844465
## 2-1 -2641.994 -7295.432 2011.445 0.3723595
Determine the HLA class at baseline(Other_Class where 1= HLA Class I
2= HLA clas II and Both = Both HLA I and II) in each DSA category
(DSA_End where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi
square/fisher test
v5%>%
dplyr::select(Other_Class, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## Other_Class 0 1 2
## 1 42.105263 17.948718 29.411765
## 2 53.947368 74.358974 58.823529
## both 1.315789 0.000000 0.000000
## Both 2.631579 7.692308 11.764706
v5%>%
dplyr::select(Other_Class, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 9.902, df = 6, p-value = 0.1288
v5%>%
dplyr::select(Other_Class, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.05429
## alternative hypothesis: two.sided
Compare only HLA Class (Other_Class) with only DSA+/+ and DSA+/- in
the DSA_End category by isolating them from the dataset and running
fisher test
v5 %>%
dplyr::filter(DSA_End != 2) %>%
dplyr::select(DSA_End, Other_Class) %>%
table() %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.02099
## alternative hypothesis: two.sided
Determine the mean and range of total MFI post enrolment
(total_eMFI) of those that remained DSA positive (DSA_End where (DSA+/+
(1), DSA+/- (0) and DSA+/Unknown(2)))
v5%>%
group_by(DSA_End)%>%
skim(total_eMFI)
Data summary
| Name |
Piped data |
| Number of rows |
132 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| total_eMFI |
0 |
76 |
0.00 |
NaN |
NA |
NA |
NA |
NA |
NA |
NA |
|
| total_eMFI |
1 |
23 |
0.41 |
19208 |
12078.63 |
5158 |
11030.5 |
14067 |
23646.5 |
46226 |
▇▅▂▂▁ |
| total_eMFI |
2 |
17 |
0.00 |
NaN |
NA |
NA |
NA |
NA |
NA |
NA |
|
Determine the percentage of each HLA class post
enrolment(Hclass_last where 1= HLA Class I 2= HLA clas II and Both =
Both HLA I and II) in each DSA +/+ patients (DSA_End where (DSA+/+ (1),
DSA+/- (0) and DSA+/Unknown(2)))
v5%>%
dplyr::select(Hclass_Last, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## Hclass_Last 0 1 2
## 1 6.25
## 2 93.75
Determine the number and percentage of patients who had biopsy
proven antibody mediated rejection on their biopsies(ABMR where 1=
biopsy proven rejection 0= no rejection) in each DSA category (DSA_End
where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2))) and run chi
square/fisher test
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()
## DSA_End
## ABMR 0 1 2
## 0 74 33 16
## 1 2 6 1
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## ABMR 0 1 2
## 0 97.368421 84.615385 94.117647
## 1 2.631579 15.384615 5.882353
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 6.6248, df = 2, p-value = 0.03643
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.03933
## alternative hypothesis: two.sided
Determine the mean and range of baseline eGFR (GFR_01) in each DSA
category (DSA_End where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2)))
and run ANOVA and Tukey’s HSD analysis
v5%>%
group_by(DSA_End)%>%
skim(GFR_01)
Data summary
| Name |
Piped data |
| Number of rows |
132 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| GFR_01 |
0 |
0 |
1 |
53.46 |
16.23 |
22 |
41 |
53 |
63.5 |
90 |
▂▇▇▃▂ |
| GFR_01 |
1 |
0 |
1 |
52.87 |
15.33 |
30 |
41 |
51 |
61.0 |
93 |
▇▇▅▂▂ |
| GFR_01 |
2 |
0 |
1 |
56.82 |
12.21 |
31 |
50 |
57 |
62.0 |
83 |
▂▅▇▃▁ |
v5%>%
aov(GFR_01 ~ DSA_End, data =.)%>%
summary()
## Df Sum Sq Mean Sq F value Pr(>F)
## DSA_End 2 197 98.46 0.409 0.665
## Residuals 129 31076 240.90
v5%>%
aov(GFR_01 ~ DSA_End, data =.)%>%
TukeyHSD()
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = GFR_01 ~ DSA_End, data = .)
##
## $DSA_End
## diff lwr upr p adj
## 1-0 -0.5887314 -7.837606 6.660143 0.9797670
## 2-0 3.3630031 -6.510493 13.236499 0.6990014
## 2-1 3.9517345 -6.743689 14.647158 0.6563420
Determine the mean and range of end of study eGFR (GFR_02) in each
DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0) and
DSA+/Unknown(2))) and run ANOVA and Tukey’s HSD analysis
v5%>%
group_by(DSA_End)%>%
skim(GFR_02)
Data summary
| Name |
Piped data |
| Number of rows |
132 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| GFR_02 |
0 |
0 |
1 |
46.63 |
18.63 |
9 |
35.5 |
46 |
58.25 |
98 |
▂▆▇▂▁ |
| GFR_02 |
1 |
0 |
1 |
43.03 |
16.68 |
13 |
31.5 |
42 |
56.50 |
79 |
▅▇▅▆▂ |
| GFR_02 |
2 |
0 |
1 |
52.06 |
18.35 |
14 |
42.0 |
56 |
61.00 |
90 |
▂▃▇▇▁ |
v5%>%
aov(GFR_02 ~ DSA_End, data =.)%>%
summary()
## Df Sum Sq Mean Sq F value Pr(>F)
## DSA_End 2 990 495.1 1.52 0.223
## Residuals 129 42004 325.6
v5%>%
aov(GFR_02 ~ DSA_End, data =.)%>%
TukeyHSD()
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = GFR_02 ~ DSA_End, data = .)
##
## $DSA_End
## diff lwr upr p adj
## 1-0 -3.605938 -12.033526 4.82165 0.5690670
## 2-0 5.427245 -6.051746 16.90623 0.5028940
## 2-1 9.033183 -3.401386 21.46775 0.2007224
Determine the mean and range of baseline UPCR(UPCR_03) in each DSA
category (DSA_End where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2)))
and run ANOVA and Tukey’s HSD analysis
v5%>%
group_by(DSA_End)%>%
skim(UPCR_03)
Data summary
| Name |
Piped data |
| Number of rows |
132 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| UPCR_03 |
0 |
16 |
0.79 |
32.15 |
41.56 |
5 |
10.75 |
19.5 |
35.25 |
240 |
▇▁▁▁▁ |
| UPCR_03 |
1 |
12 |
0.69 |
78.63 |
126.90 |
3 |
20.00 |
35.0 |
56.50 |
607 |
▇▁▁▁▁ |
| UPCR_03 |
2 |
2 |
0.88 |
55.93 |
87.27 |
3 |
7.00 |
14.0 |
45.50 |
287 |
▇▁▁▁▁ |
v5%>%
aov(UPCR_03 ~ DSA_End, data =.)%>%
summary()
## Df Sum Sq Mean Sq F value Pr(>F)
## DSA_End 2 41348 20674 3.263 0.0424 *
## Residuals 99 627257 6336
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 30 observations deleted due to missingness
v5%>%
aov(UPCR_03 ~ DSA_End, data =.)%>%
TukeyHSD()
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = UPCR_03 ~ DSA_End, data = .)
##
## $DSA_End
## diff lwr upr p adj
## 1-0 46.47963 2.587344 90.37192 0.0353073
## 2-0 23.78333 -30.892506 78.45917 0.5566404
## 2-1 -22.69630 -83.689749 38.29716 0.6507405
Determine the mean and range of end of study UPCR(UPCR_End) in each
DSA category (DSA_End where (DSA+/+ (1), DSA+/- (0) and
DSA+/Unknown(2))) and run ANOVA and Tukey’s HSD analysis
v5%>%
group_by(DSA_End)%>%
skim(UPCR_End)
Data summary
| Name |
Piped data |
| Number of rows |
132 |
| Number of columns |
150 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
DSA_End |
Variable type: numeric
| UPCR_End |
0 |
21 |
0.72 |
85.31 |
205.83 |
7 |
15.5 |
25 |
67 |
1172 |
▇▁▁▁▁ |
| UPCR_End |
1 |
14 |
0.64 |
181.48 |
217.53 |
3 |
27.0 |
59 |
252 |
726 |
▇▂▁▁▁ |
| UPCR_End |
2 |
4 |
0.76 |
299.46 |
804.50 |
5 |
8.0 |
27 |
174 |
2960 |
▇▁▁▁▁ |
v5%>%
aov(UPCR_End ~ DSA_End, data =.)%>%
summary()
## Df Sum Sq Mean Sq F value Pr(>F)
## DSA_End 2 537977 268988 2.163 0.121
## Residuals 90 11190035 124334
## 39 observations deleted due to missingness
v5%>%
aov(UPCR_End ~ DSA_End, data =.)%>%
TukeyHSD()
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = UPCR_End ~ DSA_End, data = .)
##
## $DSA_End
## diff lwr upr p adj
## 1-0 96.17091 -106.51830 298.8601 0.4977931
## 2-0 214.15245 -44.98991 473.2948 0.1257449
## 2-1 117.98154 -169.35251 405.3156 0.5922825
Determine the number and percentage of patients who had graft
failure(GF_01 where 1= graft failure 0= no graft failure) in each DSA
category (DSA_End where (DSA+/+ (1), DSA+/- (0) and DSA+/Unknown(2)))
and run chi square/fisher test
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()
## DSA_End
## ABMR 0 1 2
## 0 74 33 16
## 1 2 6 1
# Calculate proportions of the table
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()%>%
proportions(margin = 2)*100
## DSA_End
## ABMR 0 1 2
## 0 97.368421 84.615385 94.117647
## 1 2.631579 15.384615 5.882353
# Perform Chi-squared test
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()%>%
chisq.test()
## Warning in chisq.test(.): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 6.6248, df = 2, p-value = 0.03643
# Perform Fisher's exact test
v5%>%
dplyr::select(ABMR, DSA_End)%>%
table()%>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.03933
## alternative hypothesis: two.sided
MFI plot- create the new dataset (MFIplot) derived from the main
dataset, where m1 inlcudes DSA_End (0=DSA+/-, 1= baseline DSA+/+ and 2=
DSA+/Unknown and 3= post enrolment DSA+/+ and all their respective
MFIs)
MFIplot <- read.csv("~/Documents/ACF:PhD/OUTSMART DATA FILTERED/MFIplot.csv")
m1<-MFIplot
summary(m1)
## Patient.ID
## Length:171
## Class :character
## Mode :character
##
##
##
##
## DSA.Status.at.End..0..DSA...1..DSA...2.DSA.Unknown..3.DSA....post.enrolment.
## Min. :0.000
## 1st Qu.:0.000
## Median :1.000
## Mean :1.111
## 3rd Qu.:2.000
## Max. :3.000
##
## Total.MFI.Baseline.DSA
## Min. : 2082
## 1st Qu.: 3918
## Median : 6681
## Mean : 9853
## 3rd Qu.:11988
## Max. :61590
## NA's :23
colnames(m1)
## [1] "Patient.ID"
## [2] "DSA.Status.at.End..0..DSA...1..DSA...2.DSA.Unknown..3.DSA....post.enrolment."
## [3] "Total.MFI.Baseline.DSA"
m1 <- m1 %>%
rename(DSA_End = DSA.Status.at.End..0..DSA...1..DSA...2.DSA.Unknown..3.DSA....post.enrolment.)
m1$DSA_End <- as.factor(m1$DSA_End)
m1 <- m1 %>%
rename(totalMFI = Total.MFI.Baseline.DSA)
m1$totalMFI <- as.numeric(m1$totalMFI)
colnames(m1)
## [1] "Patient.ID" "DSA_End" "totalMFI"
m1$DSA_End <- factor(m1$DSA_End, levels = c("2", "0", "1", "3"))
## Warning: Removed 23 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Kaplan Meier Survival Curve for graft failure comparing DSA+/+ DSA
+/- and DSA+/Unknown
KMCurve2 table which contains randomization dates
KMCurve2<- read.csv("~/Documents/ACF:PhD/OUTSMART DATA FILTERED/KMCurve2.csv")
summary(KMCurve2)
## Label DSA_End ABMR GF_01
## Length:132 Min. :0.000 Min. :0.00000 Min. :0.0000
## Class :character 1st Qu.:0.000 1st Qu.:0.00000 1st Qu.:0.0000
## Mode :character Median :0.000 Median :0.00000 Median :0.0000
## Mean :0.553 Mean :0.06818 Mean :0.1136
## 3rd Qu.:1.000 3rd Qu.:0.00000 3rd Qu.:0.0000
## Max. :2.000 Max. :1.00000 Max. :1.0000
## Date.of.Randomisation GF_Date
## Length:132 Length:132
## Class :character Class :character
## Mode :character Mode :character
##
##
##
colnames(KMCurve2)
## [1] "Label" "DSA_End" "ABMR"
## [4] "GF_01" "Date.of.Randomisation" "GF_Date"
KMCurve2$Date.of.Randomisation <- as.Date(KMCurve2$Date.of.Randomisation, format="%d/%m/%Y")
KMCurve2$GF_Date <- as.Date(KMCurve2$GF_Date, format="%d/%m/%Y")
KMCurve2$surv_time <- as.numeric(difftime(KMCurve2$GF_Date, KMCurve2$Date.of.Randomisation, units = "days"))
KMCurve2$surv_time_months <- as.numeric(difftime(KMCurve2$GF_Date, KMCurve2$Date.of.Randomisation, units = "days")) / 30.44
str(KMCurve2)
## 'data.frame': 132 obs. of 8 variables:
## $ Label : chr "P111557 LH" "P040690 MPO" "P041108 LPP" "P082010 RT" ...
## $ DSA_End : int 1 0 1 1 1 1 1 1 1 1 ...
## $ ABMR : int 0 1 1 0 1 1 1 0 1 1 ...
## $ GF_01 : int 0 1 1 0 1 1 1 0 0 0 ...
## $ Date.of.Randomisation: Date, format: "2016-04-13" "2014-10-24" ...
## $ GF_Date : Date, format: "2020-12-31" "2015-12-24" ...
## $ surv_time : num 1723 426 708 1539 1379 ...
## $ surv_time_months : num 56.6 14 23.3 50.6 45.3 ...
surv_object_months <- Surv(time = KMCurve2$surv_time_months, event = KMCurve2$GF_01)
km_fit_months <- survfit(surv_object_months ~ DSA_End, data = KMCurve2)
