#### Analisis COMPARATIVO : NUMERO DIAS VAC 17-02-2021
### Proyecto: CARDIOVAC
### Investigadores: Dra. Chaparro - Dr. Cruz
## Analistas: Yaset Caicedo - Akemi Arango
library(readxl)
library(dplyr)
## Warning: replacing previous import 'vctrs::data_frame' by 'tibble::data_frame'
## when loading '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
library(janitor)
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(skimr)
library(ggplot2)
### Lectura de Base de Datos
cardiovac <- read_excel("DATA/CARDIOVAC_2020-05-06_registros_1-120.xlsx")
cardiovac <- cardiovac %>%
filter(edad >= 1)
### 120 datos
#### Variable de Division
cardiovac %>%
tabyl(diasvac)
## diasvac n percent
## 1 39 0.325000000
## 2 43 0.358333333
## 3 29 0.241666667
## 4 4 0.033333333
## 5 4 0.033333333
## 23 1 0.008333333
cardiovac <- cardiovac %>%
mutate(npv3 = ifelse(diasvac >= 3,1,0))
cardiovac %>%
tabyl(npv3)
## npv3 n percent
## 0 82 0.6833333
## 1 38 0.3166667
cardiovac$npv3 <- as.factor(cardiovac$npv3)
levels(cardiovac$npv3) <- c("Menor 48 h", "Mayor 48h")
### DESCRIPCION DE LOS DATOS
# Edad
cardiovac %>%
group_by(npv3) %>%
skim(edad)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
43 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| edad |
Menor 48 h |
0 |
1 |
58.99 |
13.78 |
21 |
51.00 |
61.0 |
69.00 |
80 |
▂▂▅▇▆ |
| edad |
Mayor 48h |
0 |
1 |
62.37 |
10.06 |
37 |
58.25 |
63.5 |
68.75 |
82 |
▃▂▇▇▂ |
with(data = cardiovac, t.test(edad ~ npv3))
##
## Welch Two Sample t-test
##
## data: edad by npv3
## t = -1.5149, df = 96.128, p-value = 0.1331
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -7.810121 1.048889
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 58.98780 62.36842
#Genero
cardiovac %>%
tabyl(sexo, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## sexo Menor 48 h Mayor 48h Total
## 0 26 (31.7%) 11 (28.9%) 37 (30.8%)
## 1 56 (68.3%) 27 (71.1%) 83 (69.2%)
cardiovac %>%
tabyl(sexo, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 0.0084772, df = 1, p-value = 0.9266
## IMC
cardiovac %>%
tabyl(imc, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## imc Menor 48 h Mayor 48h Total
## 0 5 (6.1%) 2 (5.3%) 7 (5.8%)
## 1 35 (42.7%) 13 (34.2%) 48 (40.0%)
## 2 29 (35.4%) 13 (34.2%) 42 (35.0%)
## 3 9 (11.0%) 7 (18.4%) 16 (13.3%)
## 4 2 (2.4%) 0 (0.0%) 2 (1.7%)
## SD 2 (2.4%) 3 (7.9%) 5 (4.2%)
cardiovac %>%
tabyl(imc, npv3) %>%
chisq.test()
## Warning in stats::chisq.test(., ...): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 4.3682, df = 5, p-value = 0.4977
## Clase Funcional
cardiovac %>%
tabyl(nyha, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## nyha Menor 48 h Mayor 48h Total
## 1 32 (39.0%) 14 (36.8%) 46 (38.3%)
## 2 16 (19.5%) 4 (10.5%) 20 (16.7%)
## 3 24 (29.3%) 17 (44.7%) 41 (34.2%)
## 4 7 (8.5%) 3 (7.9%) 10 (8.3%)
## SD 3 (3.7%) 0 (0.0%) 3 (2.5%)
cardiovac %>%
tabyl(nyha, npv3) %>%
chisq.test()
## Warning in stats::chisq.test(., ...): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 4.5119, df = 4, p-value = 0.3411
################# Tipo de Cx Cardiovascular
### Tipo de Cirugia por Frecuencia Original
cardiovac %>%
tabyl(tipocx, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## tipocx Menor 48 h Mayor 48h Total
## 0 2 (2.4%) 5 (13.2%) 7 (5.8%)
## 1 3 (3.7%) 0 (0.0%) 3 (2.5%)
## 2 1 (1.2%) 1 (2.6%) 2 (1.7%)
## 3 4 (4.9%) 7 (18.4%) 11 (9.2%)
## 4 8 (9.8%) 6 (15.8%) 14 (11.7%)
## 5 15 (18.3%) 6 (15.8%) 21 (17.5%)
## 6 36 (43.9%) 9 (23.7%) 45 (37.5%)
## 7 3 (3.7%) 2 (5.3%) 5 (4.2%)
## 8 10 (12.2%) 2 (5.3%) 12 (10.0%)
cardiovac %>%
tabyl(tipocx, npv3) %>%
chisq.test()
## Warning in stats::chisq.test(., ...): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 17.153, df = 8, p-value = 0.02856
## Tipos de Cirugia
cardiovac <- cardiovac %>%
mutate(tipocx_2 = case_when(
tipocx == 0 ~ "Trasplante",
tipocx == 4 | tipocx == 5 | tipocx == 6 ~ "Cx Aorta Ascendente",
tipocx == 1 ~ " Cx Valvular Aortica",
tipocx == 2 ~ "Cx Valvular Mitral",
tipocx == 7 ~ "Revascularizacion",
tipocx == 3 | tipocx == 8 ~ "Combinadas"))
cardiovac %>%
tabyl(tipocx_2, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## tipocx_2 Menor 48 h Mayor 48h Total
## Cx Valvular Aortica 3 (3.7%) 0 (0.0%) 3 (2.5%)
## Combinadas 14 (17.1%) 9 (23.7%) 23 (19.2%)
## Cx Aorta Ascendente 59 (72.0%) 21 (55.3%) 80 (66.7%)
## Cx Valvular Mitral 1 (1.2%) 1 (2.6%) 2 (1.7%)
## Revascularizacion 3 (3.7%) 2 (5.3%) 5 (4.2%)
## Trasplante 2 (2.4%) 5 (13.2%) 7 (5.8%)
cardiovac %>%
tabyl(tipocx_2, npv3) %>%
chisq.test()
## Warning in stats::chisq.test(., ...): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 8.6526, df = 5, p-value = 0.1237
#### Antecedentes
## ERC
cardiovac %>%
tabyl(anterc, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## anterc Menor 48 h Mayor 48h Total
## 0 80 (97.6%) 32 (84.2%) 112 (93.3%)
## 1 2 (2.4%) 6 (15.8%) 8 (6.7%)
cardiovac %>%
tabyl(anterc, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.0122
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 1.233798 78.178670
## sample estimates:
## odds ratio
## 7.358211
## Enf Hepatica
cardiovac %>%
tabyl(anthepatopatia, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## anthepatopatia Menor 48 h Mayor 48h Total
## 0 81 (98.8%) 36 (94.7%) 117 (97.5%)
## 1 1 (1.2%) 2 (5.3%) 3 (2.5%)
cardiovac %>%
tabyl(anthepatopatia, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.2353
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.2243481 268.2066110
## sample estimates:
## odds ratio
## 4.437473
## ICC
cardiovac %>%
tabyl(anticc, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## anticc Menor 48 h Mayor 48h Total
## 0 57 (69.5%) 27 (71.1%) 84 (70.0%)
## 1 25 (30.5%) 11 (28.9%) 36 (30.0%)
cardiovac %>%
tabyl(anticc, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 2.7679e-31, df = 1, p-value = 1
## DM2
cardiovac %>%
tabyl(antdm, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## antdm Menor 48 h Mayor 48h Total
## 0 76 (92.7%) 32 (84.2%) 108 (90.0%)
## 1 6 (7.3%) 6 (15.8%) 12 (10.0%)
cardiovac %>%
tabyl(antdm, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.1923
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.5820933 9.5591548
## sample estimates:
## odds ratio
## 2.356126
## HTP
cardiovac %>%
tabyl(anthtp, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## anthtp Menor 48 h Mayor 48h Total
## 0 72 (87.8%) 32 (84.2%) 104 (86.7%)
## 1 10 (12.2%) 6 (15.8%) 16 (13.3%)
cardiovac %>%
tabyl(anthtp, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.5766
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.3689762 4.5141589
## sample estimates:
## odds ratio
## 1.346542
## Coagulopatia
cardiovac %>%
tabyl(antcoagulopatia, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## antcoagulopatia Menor 48 h Mayor 48h Total
## 0 81 (98.8%) 35 (92.1%) 116 (96.7%)
## 1 1 (1.2%) 3 (7.9%) 4 (3.3%)
cardiovac %>%
tabyl(antcoagulopatia, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.0932
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.5270379 368.0328964
## sample estimates:
## odds ratio
## 6.82063
##### Medicamentos Pre-QX
## ACO
cardiovac %>%
tabyl(anticoagpreqx, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## anticoagpreqx Menor 48 h Mayor 48h Total
## 0 62 (75.6%) 26 (68.4%) 88 (73.3%)
## 1 15 (18.3%) 5 (13.2%) 20 (16.7%)
## 2 4 (4.9%) 6 (15.8%) 10 (8.3%)
## 4 1 (1.2%) 0 (0.0%) 1 (0.8%)
## 5 0 (0.0%) 1 (2.6%) 1 (0.8%)
cardiovac %>%
tabyl(anticoagpreqx, npv3) %>%
chisq.test()
## Warning in stats::chisq.test(., ...): Chi-squared approximation may be incorrect
##
## Pearson's Chi-squared test
##
## data: .
## X-squared = 6.925, df = 4, p-value = 0.1399
## Antiagregante
cardiovac %>%
tabyl(antiagregpreqx, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## antiagregpreqx Menor 48 h Mayor 48h Total
## 0 58 (70.7%) 28 (73.7%) 86 (71.7%)
## 1 19 (23.2%) 9 (23.7%) 28 (23.3%)
## 2 4 (4.9%) 1 (2.6%) 5 (4.2%)
## 3 1 (1.2%) 0 (0.0%) 1 (0.8%)
cardiovac %>%
tabyl(antiagregpreqx, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 1
## alternative hypothesis: two.sided
#### CONDICION PREVIA
## FEVI Pre-QX
cardiovac %>%
group_by(npv3) %>%
skim(fevipreqx)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
44 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| fevipreqx |
Menor 48 h |
0 |
1 |
53.46 |
12.24 |
5 |
49.00 |
58.0 |
60 |
75 |
▁▁▂▇▂ |
| fevipreqx |
Mayor 48h |
0 |
1 |
50.03 |
16.64 |
5 |
41.25 |
58.5 |
60 |
73 |
▁▂▂▃▇ |
with(data = cardiovac, wilcox.test(fevipreqx ~ npv3))
##
## Wilcoxon rank sum test with continuity correction
##
## data: fevipreqx by npv3
## W = 1640, p-value = 0.64
## alternative hypothesis: true location shift is not equal to 0
cardiovac <- cardiovac %>%
mutate(fevi40 = ifelse(fevipreqx <= 40,1,0))
cardiovac %>%
tabyl(fevi40, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## fevi40 Menor 48 h Mayor 48h Total
## 0 71 (86.6%) 28 (73.7%) 99 (82.5%)
## 1 11 (13.4%) 10 (26.3%) 21 (17.5%)
cardiovac %>%
tabyl(fevi40, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 2.1666, df = 1, p-value = 0.141
## Creatinina Pre-Qx
cardiovac %>%
group_by(npv3) %>%
skim(crepreqx)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| crepreqx |
Menor 48 h |
0 |
1 |
0.95 |
0.24 |
0.51 |
0.78 |
0.92 |
1.10 |
1.89 |
▅▇▃▁▁ |
| crepreqx |
Mayor 48h |
0 |
1 |
1.19 |
0.94 |
0.55 |
0.81 |
1.00 |
1.28 |
6.35 |
▇▁▁▁▁ |
with(data = cardiovac, t.test(crepreqx ~ npv3) )
##
## Welch Two Sample t-test
##
## data: crepreqx by npv3
## t = -1.5744, df = 39.358, p-value = 0.1234
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.55433919 0.06899901
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 0.9454878 1.1881579
## Endocarditis
cardiovac %>%
tabyl(endocarditispreqx, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## endocarditispreqx Menor 48 h Mayor 48h Total
## 0 77 (93.9%) 35 (92.1%) 112 (93.3%)
## 1 5 (6.1%) 3 (7.9%) 8 (6.7%)
cardiovac %>%
tabyl(endocarditispreqx, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.707
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.1937414 7.2100913
## sample estimates:
## odds ratio
## 1.31687
####MANEJO QUIRURGICO
## Hipotermia
cardiovac %>%
tabyl(tempintraop, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## tempintraop Menor 48 h Mayor 48h Total
## 0 3 (3.7%) 1 (2.6%) 4 (3.3%)
## 1 51 (62.2%) 21 (55.3%) 72 (60.0%)
## 2 2 (2.4%) 2 (5.3%) 4 (3.3%)
## 3 26 (31.7%) 14 (36.8%) 40 (33.3%)
cardiovac %>%
tabyl(tempintraop, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.7715
## alternative hypothesis: two.sided
## Hipotermia Profunda - Arresto Cardiaco
cardiovac %>%
tabyl(hipotermiaprof, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## hipotermiaprof Menor 48 h Mayor 48h Total
## 0 68 (82.9%) 27 (71.1%) 95 (79.2%)
## 1 14 (17.1%) 11 (28.9%) 25 (20.8%)
cardiovac %>%
tabyl(hipotermiaprof, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 1.5583, df = 1, p-value = 0.2119
### Tiempo de Isquemia
cardiovac %>%
group_by(npv3) %>%
skim(tisquemia)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| tisquemia |
Menor 48 h |
0 |
1 |
97.09 |
34.65 |
21 |
77.25 |
95.5 |
113.75 |
233 |
▂▇▅▁▁ |
| tisquemia |
Mayor 48h |
0 |
1 |
103.82 |
40.94 |
33 |
82.25 |
101.5 |
122.75 |
201 |
▃▆▇▂▂ |
with(data = cardiovac, t.test(tisquemia ~ npv3))
##
## Welch Two Sample t-test
##
## data: tisquemia by npv3
## t = -0.87813, df = 62.504, p-value = 0.3832
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -22.049132 8.588285
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 97.08537 103.81579
### Tiempo Circulacion Extracorporea
cardiovac %>%
group_by(npv3) %>%
skim(tcextracorporea)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| tcextracorporea |
Menor 48 h |
0 |
1 |
135.98 |
42.52 |
52 |
110.25 |
126.5 |
162.00 |
235 |
▃▇▆▅▂ |
| tcextracorporea |
Mayor 48h |
0 |
1 |
157.26 |
60.60 |
60 |
121.75 |
144.5 |
185.25 |
328 |
▃▇▃▂▁ |
with(data = cardiovac, t.test(tcextracorporea ~ npv3))
##
## Welch Two Sample t-test
##
## data: tcextracorporea by npv3
## t = -1.954, df = 54.509, p-value = 0.05584
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -43.1250681 0.5499718
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 135.9756 157.2632
### Recibio Transfusiones durante Cirugia
cardiovac %>%
tabyl(transfusionintraop, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## transfusionintraop Menor 48 h Mayor 48h Total
## 0 4 (4.9%) 1 (2.6%) 5 (4.2%)
## 1 78 (95.1%) 37 (97.4%) 115 (95.8%)
cardiovac %>%
tabyl(transfusionintraop, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 1
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.1786088 95.8903773
## sample estimates:
## odds ratio
## 1.888548
### Numero de Globulos Rojos Transfundidos IntraQX
cardiovac %>%
filter(grintraop >= 1) %>%
group_by(npv3) %>%
skim(grintraop)
Data summary
| Name |
Piped data |
| Number of rows |
93 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| grintraop |
Menor 48 h |
0 |
1 |
3.41 |
2.18 |
1 |
2 |
3 |
4.00 |
10 |
▇▅▂▁▁ |
| grintraop |
Mayor 48h |
0 |
1 |
4.44 |
2.54 |
1 |
3 |
4 |
5.75 |
12 |
▇▇▃▁▁ |
with(data = cardiovac[cardiovac$grintraop >=1,], t.test(grintraop ~ npv3))
##
## Welch Two Sample t-test
##
## data: grintraop by npv3
## t = -1.9906, df = 60.851, p-value = 0.05102
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.073508125 0.004714506
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 3.406780 4.441176
## Plasma Congelado Intraqx
cardiovac %>%
filter(pfcintraop >= 1) %>%
group_by(npv3) %>%
skim(pfcintraop)
Data summary
| Name |
Piped data |
| Number of rows |
96 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| pfcintraop |
Menor 48 h |
0 |
1 |
6.02 |
2.65 |
1 |
4 |
6.0 |
6.75 |
14 |
▂▇▂▁▁ |
| pfcintraop |
Mayor 48h |
0 |
1 |
7.65 |
3.55 |
2 |
6 |
6.5 |
10.00 |
15 |
▃▇▂▃▃ |
with(data = cardiovac[cardiovac$pfcintraop >=1,], t.test(pfcintraop ~ npv3))
##
## Welch Two Sample t-test
##
## data: pfcintraop by npv3
## t = -2.3456, df = 53.486, p-value = 0.02274
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -3.0252490 -0.2366106
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 6.016129 7.647059
## Plaquetas Congelado Intraqx
cardiovac %>%
filter(pltintraop >= 1) %>%
group_by(npv3) %>%
skim(pltintraop)
Data summary
| Name |
Piped data |
| Number of rows |
103 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| pltintraop |
Menor 48 h |
0 |
1 |
1.40 |
0.71 |
1 |
1 |
1 |
2 |
4 |
▇▂▁▁▁ |
| pltintraop |
Mayor 48h |
0 |
1 |
1.91 |
1.10 |
1 |
1 |
2 |
2 |
5 |
▇▇▁▂▁ |
with(data = cardiovac[cardiovac$pltintraop >=1,], t.test(pltintraop ~ npv3))
##
## Welch Two Sample t-test
##
## data: pltintraop by npv3
## t = -2.4304, df = 45.003, p-value = 0.01913
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.93098838 -0.08719344
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 1.400000 1.909091
## Crioprecipitado Congelado Intraqx
cardiovac %>%
filter(criointraop >= 1) %>%
group_by(npv3) %>%
skim(criointraop)
Data summary
| Name |
Piped data |
| Number of rows |
103 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| criointraop |
Menor 48 h |
0 |
1 |
10.48 |
4.20 |
4 |
8 |
10 |
12.00 |
25 |
▇▇▃▂▁ |
| criointraop |
Mayor 48h |
0 |
1 |
10.94 |
5.77 |
3 |
8 |
10 |
11.75 |
30 |
▆▇▂▁▁ |
with(data = cardiovac[cardiovac$criointraop >=1,], t.test(criointraop ~ npv3))
##
## Welch Two Sample t-test
##
## data: criointraop by npv3
## t = -0.41633, df = 50.806, p-value = 0.6789
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.695337 1.769506
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 10.47826 10.94118
#######################################
##### Post-QX
####### Sangrado en las primeras 12 h
cardiovac %>%
group_by(npv3) %>%
skim(sangrado12h)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| sangrado12h |
Menor 48 h |
0 |
1 |
668.28 |
393.77 |
100 |
400 |
525.0 |
872.5 |
2110 |
▇▅▂▁▁ |
| sangrado12h |
Mayor 48h |
0 |
1 |
879.08 |
379.00 |
300 |
600 |
832.5 |
1175.0 |
1850 |
▇▇▆▅▁ |
with(data = cardiovac, t.test(sangrado12h ~ npv3))
##
## Welch Two Sample t-test
##
## data: sangrado12h by npv3
## t = -2.7992, df = 74.734, p-value = 0.006514
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -360.82461 -60.77231
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 668.2805 879.0789
####### Sangrado en 12 h a 24 h
cardiovac %>%
group_by(npv3) %>%
skim(sangrado24h)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
45 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| sangrado24h |
Menor 48 h |
0 |
1 |
243.10 |
153.45 |
0 |
150.0 |
200 |
300.0 |
954 |
▅▇▁▁▁ |
| sangrado24h |
Mayor 48h |
0 |
1 |
260.13 |
159.20 |
0 |
142.5 |
225 |
327.5 |
610 |
▇▇▇▂▅ |
with(data = cardiovac, t.test(sangrado24h ~ npv3))
##
## Welch Two Sample t-test
##
## data: sangrado24h by npv3
## t = -0.55146, df = 69.81, p-value = 0.5831
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -78.64252 44.57448
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 243.0976 260.1316
#### Sangrado Total
cardiovac <- cardiovac %>%
mutate(sangradototal = sangrado12h + sangrado24h)
cardiovac %>%
group_by(npv3) %>%
skim(sangradototal)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| sangradototal |
Menor 48 h |
0 |
1 |
911.38 |
461.44 |
320 |
600 |
800 |
1092.5 |
2810 |
▇▅▂▁▁ |
| sangradototal |
Mayor 48h |
0 |
1 |
1139.21 |
481.13 |
370 |
800 |
1050 |
1442.5 |
2260 |
▅▇▆▃▂ |
with(data = cardiovac, t.test(sangradototal ~ npv3))
##
## Welch Two Sample t-test
##
## data: sangradototal by npv3
## t = -2.4442, df = 69.498, p-value = 0.01706
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -413.76169 -41.90326
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 911.378 1139.211
### Requirio Transfusiion Post-operatoria
cardiovac %>%
tabyl(transfpop, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## transfpop Menor 48 h Mayor 48h Total
## 0 47 (57.3%) 11 (28.9%) 58 (48.3%)
## 1 35 (42.7%) 27 (71.1%) 62 (51.7%)
cardiovac %>%
tabyl(transfpop, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 7.2714, df = 1, p-value = 0.007006
### Transfusiones Postoperatorias
## Globulos Rojos
cardiovac %>%
filter(grpop >= 1) %>%
group_by(npv3) %>%
skim(grpop)
Data summary
| Name |
Piped data |
| Number of rows |
56 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| grpop |
Menor 48 h |
0 |
1 |
2.90 |
2.45 |
1 |
1 |
2 |
4 |
13 |
▇▂▁▁▁ |
| grpop |
Mayor 48h |
0 |
1 |
3.16 |
1.93 |
1 |
2 |
2 |
4 |
9 |
▇▅▁▁▁ |
with(data = cardiovac[cardiovac$grpop >=1,], t.test(grpop ~ npv3))
##
## Welch Two Sample t-test
##
## data: grpop by npv3
## t = -0.43828, df = 53.976, p-value = 0.6629
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.4313869 0.9178385
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 2.903226 3.160000
### Plasma Fresco Congelado
cardiovac %>%
filter(pfcpop >= 1) %>%
group_by(npv3) %>%
skim(pfcpop)
Data summary
| Name |
Piped data |
| Number of rows |
27 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| pfcpop |
Menor 48 h |
0 |
1 |
4.82 |
3.71 |
1 |
2.5 |
4 |
5 |
14 |
▆▇▁▂▂ |
| pfcpop |
Mayor 48h |
0 |
1 |
5.50 |
3.71 |
1 |
2.5 |
5 |
8 |
12 |
▇▅▃▆▃ |
with(data = cardiovac[cardiovac$pfcpop >=1,], t.test(pfcpop ~ npv3))
##
## Welch Two Sample t-test
##
## data: pfcpop by npv3
## t = -0.46943, df = 21.637, p-value = 0.6435
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -3.696917 2.333281
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 4.818182 5.500000
### Plaquetas
cardiovac %>%
filter(pltpop >= 1) %>%
group_by(npv3) %>%
skim(pltpop)
Data summary
| Name |
Piped data |
| Number of rows |
29 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| pltpop |
Menor 48 h |
0 |
1 |
1.56 |
0.81 |
1 |
1 |
1 |
2 |
4 |
▇▅▁▁▁ |
| pltpop |
Mayor 48h |
0 |
1 |
2.15 |
1.41 |
1 |
1 |
2 |
3 |
6 |
▇▂▁▁▁ |
with(data = cardiovac[cardiovac$pltpop >=1,], t.test(pltpop ~ npv3))
##
## Welch Two Sample t-test
##
## data: pltpop by npv3
## t = -1.3451, df = 18.344, p-value = 0.195
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.5137462 0.3310539
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 1.562500 2.153846
## Crioprecipitado
cardiovac %>%
filter(criopop >= 1) %>%
group_by(npv3) %>%
skim(criopop)
Data summary
| Name |
Piped data |
| Number of rows |
17 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| criopop |
Menor 48 h |
0 |
1 |
7.71 |
2.21 |
6 |
6.00 |
6 |
9.5 |
11 |
▇▁▂▂▂ |
| criopop |
Mayor 48h |
0 |
1 |
8.10 |
4.20 |
3 |
5.25 |
8 |
10.0 |
16 |
▇▅▇▂▂ |
with(data = cardiovac[cardiovac$criopop >=1,], t.test(criopop ~ npv3))
##
## Welch Two Sample t-test
##
## data: criopop by npv3
## t = -0.24561, df = 14.205, p-value = 0.8095
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -3.749386 2.977957
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 7.714286 8.100000
###############
#### RESULTADOS CLINICOS######
### Infeccion del Sitio Operatorio
cardiovac %>%
tabyl(iso, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## iso Menor 48 h Mayor 48h Total
## 0 77 (93.9%) 33 (86.8%) 110 (91.7%)
## 1 5 (6.1%) 5 (13.2%) 10 (8.3%)
cardiovac %>%
tabyl(iso, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.2851
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.496922 10.805172
## sample estimates:
## odds ratio
## 2.31519
### Mediastinitis Postoperatoria
cardiovac %>%
tabyl(mediastinitis, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## mediastinitis Menor 48 h Mayor 48h Total
## 0 77 (93.9%) 33 (86.8%) 110 (91.7%)
## 1 5 (6.1%) 5 (13.2%) 10 (8.3%)
cardiovac %>%
tabyl(mediastinitis, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 0.2851
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 0.496922 10.805172
## sample estimates:
## odds ratio
## 2.31519
### AKI-Postoperatoria
cardiovac %>%
tabyl(akipop, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## akipop Menor 48 h Mayor 48h Total
## 0 66 (80.5%) 15 (39.5%) 81 (67.5%)
## 1 16 (19.5%) 23 (60.5%) 39 (32.5%)
cardiovac %>%
tabyl(akipop, npv3) %>%
fisher.test()
##
## Fisher's Exact Test for Count Data
##
## data: .
## p-value = 1.718e-05
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
## 2.493921 16.142097
## sample estimates:
## odds ratio
## 6.207924
#### Estancia en UCI
cardiovac %>%
group_by(npv3) %>%
skim(diasuci)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| diasuci |
Menor 48 h |
0 |
1 |
9.99 |
10.20 |
1 |
6.00 |
8 |
10.75 |
74 |
▇▁▁▁▁ |
| diasuci |
Mayor 48h |
0 |
1 |
11.21 |
6.43 |
3 |
6.25 |
10 |
14.50 |
28 |
▇▅▂▁▁ |
with(data = cardiovac, wilcox.test(diasuci ~ npv3 ))
##
## Wilcoxon rank sum test with continuity correction
##
## data: diasuci by npv3
## W = 1263, p-value = 0.09569
## alternative hypothesis: true location shift is not equal to 0
#### Tiempo de Intubacion
cardiovac %>%
group_by(npv3) %>%
skim(tintubacion)
Data summary
| Name |
Piped data |
| Number of rows |
120 |
| Number of columns |
46 |
| _______________________ |
|
| Column type frequency: |
|
| numeric |
1 |
| ________________________ |
|
| Group variables |
npv3 |
Variable type: numeric
| tintubacion |
Menor 48 h |
0 |
1 |
3.95 |
2.84 |
1 |
2 |
3 |
5.00 |
21 |
▇▂▁▁▁ |
| tintubacion |
Mayor 48h |
0 |
1 |
5.76 |
2.79 |
2 |
4 |
5 |
6.75 |
15 |
▇▆▂▁▁ |
with(data = cardiovac, t.test(tintubacion ~ npv3 ))
##
## Welch Two Sample t-test
##
## data: tintubacion by npv3
## t = -3.2869, df = 73.265, p-value = 0.001557
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -2.9105336 -0.7133432
## sample estimates:
## mean in group Menor 48 h mean in group Mayor 48h
## 3.951220 5.763158
### Necesidad de Reintervención
cardiovac %>%
tabyl(reintervencion, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## reintervencion Menor 48 h Mayor 48h Total
## 0 66 (80.5%) 29 (76.3%) 95 (79.2%)
## 1 16 (19.5%) 9 (23.7%) 25 (20.8%)
cardiovac %>%
tabyl(reintervencion, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 0.079454, df = 1, p-value = 0.778
### Mortalidad
cardiovac %>%
tabyl(mortalidadintrahospitalaria, npv3) %>%
adorn_totals(c("col")) %>%
adorn_percentages(denominator = "col") %>%
adorn_pct_formatting() %>%
adorn_ns(position = "front") %>%
adorn_title()
## npv3
## mortalidadintrahospitalaria Menor 48 h Mayor 48h Total
## 0 72 (87.8%) 28 (73.7%) 100 (83.3%)
## 1 10 (12.2%) 10 (26.3%) 20 (16.7%)
cardiovac %>%
tabyl(mortalidadintrahospitalaria, npv3) %>%
chisq.test()
##
## Pearson's Chi-squared test with Yates' continuity correction
##
## data: .
## X-squared = 2.7805, df = 1, p-value = 0.09542