Oxido Nitrico Inalado Para Tratamento de Infeccao por SARS-CoV2- um ensaio clinico aberto, paralelo e randomizado

CNPq Processo 403202/2020-5

Coordenador: Marcus Herbert Jones

data preparation

Table: Demographics

##                                            Stratified by grupo
##                                             Control                 iNO                      p      test   
##   n                                             27                      27                                 
##   Sex = Male (%)                                18 (66.7)               19 (70.4)             1.000        
##   Age (median [IQR])                         53.00 [39.00, 64.50]    57.00 [40.00, 62.50]     0.938 nonnorm
##   Weight (median [IQR])                      85.00 [80.00, 100.00]   88.00 [81.00, 96.50]     0.829 nonnorm
##   Height (median [IQR])                     167.00 [158.50, 176.00] 174.00 [166.00, 180.50]   0.079 nonnorm
##   BMI (median [IQR])                         32.17 [29.02, 33.97]    30.07 [27.07, 32.50]     0.132 nonnorm
##   obesity (%)                                                                                 0.259        
##      Healthy weight                              0 ( 0.0)                2 ( 7.4)                          
##      Obesity                                    18 (66.7)               14 (51.9)                          
##      Overweight                                  9 (33.3)               11 (40.7)                          
##   race (%)                                                                                    0.137        
##      Black                                       2 ( 7.4)                5 (18.5)                          
##      Brown                                       5 (18.5)                1 ( 3.7)                          
##      White                                      20 (74.1)               21 (77.8)                          
##   Tobacco use = Yes (%)                          1 ( 3.7)                1 ( 3.7)             1.000        
##   Alcohol use = 1 (%)                            8 (29.6)               13 (48.1)             0.264        
##   Symptoms(days) (median [IQR])               8.00 [7.00, 10.00]      9.00 [8.00, 11.00]      0.383 nonnorm
##   Resp Symptoms(days) (median [IQR])          3.00 [2.00, 5.00]       4.00 [2.00, 5.00]       0.395 nonnorm
##   status_vacinal = No COVID vaccine (%)         17 (70.8)               16 (66.7)             1.000        
##   Antiinflamatorio = Yes (%)                    15 (55.6)               15 (55.6)             1.000        
##   Azitromicina = Yes (%)                        15 (55.6)               17 (63.0)             0.782        
##   Antibioticos = Yes (%)                         6 (22.2)                5 (18.5)             1.000        
##   Hidroxicloroquina = Yes (%)                    5 (18.5)                3 (11.1)             0.702        
##   Corticoide = Yes (%)                          15 (55.6)               14 (51.9)             1.000        
##   Nenhum = Yes (%)                               2 ( 7.4)                3 (11.1)             1.000        
##   Comorbidities = Yes (%)                       13 (48.1)                9 (33.3)             0.406        
##   has = Yes (%)                                 13 (48.1)                9 (33.3)             0.406        
##   chf = Yes (%)                                  1 ( 3.7)                0 ( 0.0)             1.000        
##   dm1 = Yes (%)                                  2 ( 7.4)                1 ( 3.7)             1.000        
##   dm2 = Yes (%)                                  6 (22.2)                0 ( 0.0)             0.030        
##   satpo2_ar_ambiente (median [IQR])          90.00 [89.00, 91.00]    91.00 [89.75, 92.25]     0.159 nonnorm
##   C-reactive_protein (median [IQR])           7.70 [4.75, 21.45]      7.70 [4.30, 22.10]      0.959 nonnorm
##   D-dimer (median [IQR])                    601.50 [360.00, 791.25] 783.00 [549.00, 1065.00]  0.040 nonnorm
##   CT: pulmonary involvement% (median [IQR])  50.00 [30.00, 60.00]    50.00 [40.00, 50.00]     0.944 nonnorm

Table 2: Primary and secondary Outcomes Stratified by Treatment Group

All Subjects

##                                                      Stratified by grupo
##                                                       Control            iNO                 p     
##   n                                                     27                  27                     
##   Days Free of Vent Support (median [IQR])            8.00 [2.50, 10.50] 11.00 [8.00, 13.00]  0.043
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]   4.00 [3.00, 4.00]   0.010
##   Score Day 5 (median [IQR])                          4.00 [3.50, 5.00]   3.00 [2.00, 4.00]   0.032
##   Score Day 7 (median [IQR])                          4.00 [2.00, 5.00]   2.00 [1.50, 3.50]   0.081
##   worsening = Yes (%)                                   11 (40.7)            7 (25.9)         0.386
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   26 (96.3)           18 (66.7)         0.014
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)   20 (74.1)           13 (48.1)         0.094
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)   14 (51.9)            7 (25.9)         0.094
##   mech_vent = Yes (%)                                    5 (18.5)            5 (18.5)         1.000
##   Length of Stay (Days) (median [IQR])                7.00 [6.00, 10.00]  4.50 [3.00, 6.25]   0.004
##   Death = Yes (%)                                        2 ( 7.7)            3 (11.1)         1.000
##                                                      Stratified by grupo
##                                                       test   
##   n                                                          
##   Days Free of Vent Support (median [IQR])            nonnorm
##   Score Day 3 (median [IQR])                          nonnorm
##   Score Day 5 (median [IQR])                          nonnorm
##   Score Day 7 (median [IQR])                          nonnorm
##   worsening = Yes (%)                                        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)        
##   mech_vent = Yes (%)                                        
##   Length of Stay (Days) (median [IQR])                nonnorm
##   Death = Yes (%)

wilcox_test clinical score 3 5 7 10 detailed

# load package
library(ggstatsplot)

# plot with statistical results
ggbetweenstats( # independent samples
  data = df,
  x = grupo,
  y = dlo,
  plot.type = "box", # for boxplot
  type = "nonparametric", # for wilcoxon
  centrality.plotting = FALSE # remove median
)

ggbetweenstats( # independent samples
  data = df,
  x = grupo,
  y = do,
  plot.type = "box", # for boxplot
  type = "nonparametric", # for wilcoxon
  centrality.plotting = FALSE # remove median
)

ggbetweenstats( # independent samples
  data = df,
  x = grupo,
  y = los,
  plot.type = "box", # for boxplot
  type = "nonparametric", # for wilcoxon
  centrality.plotting = FALSE # remove median
)

Figures: Mean Clinical Score: Day 1 to Day 15

Figures: Days Free of Respiratory Support & Length of Stay

All Subjects

Days Free of Respiratory Support

# Load the required library
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
# Create the boxplot with jitter
plot <- plot_ly(df, x = ~grupo, y = ~dlo, type = "box", boxpoints = "all") %>% add_trace(type = "scatter", mode = "jitter", marker = list(size = 1))

# Customize the layout
layout <- list(
  title = "Boxplot with Jitter for Two Groups",
  marker = list(color = c("#F39780", "#3D5A80")),
  xaxis = list(title = "Group"),
  yaxis = list(title = "Oxygen Free Days")
)

# Combine plot and layout
plot <- plot %>% layout(layout)

# Display the plot
plot
## A marker object has been specified, but markers is not in the mode
## Adding markers to the mode...
## Warning: 'scatter' objects don't have these attributes: 'boxpoints'
## Valid attributes include:
## 'cliponaxis', 'connectgaps', 'customdata', 'customdatasrc', 'dx', 'dy', 'error_x', 'error_y', 'fill', 'fillcolor', 'fillpattern', 'groupnorm', 'hoverinfo', 'hoverinfosrc', 'hoverlabel', 'hoveron', 'hovertemplate', 'hovertemplatesrc', 'hovertext', 'hovertextsrc', 'ids', 'idssrc', 'legendgroup', 'legendgrouptitle', 'legendrank', 'line', 'marker', 'meta', 'metasrc', 'mode', 'name', 'opacity', 'orientation', 'selected', 'selectedpoints', 'showlegend', 'stackgaps', 'stackgroup', 'stream', 'text', 'textfont', 'textposition', 'textpositionsrc', 'textsrc', 'texttemplate', 'texttemplatesrc', 'transforms', 'type', 'uid', 'uirevision', 'unselected', 'visible', 'x', 'x0', 'xaxis', 'xcalendar', 'xhoverformat', 'xperiod', 'xperiod0', 'xperiodalignment', 'xsrc', 'y', 'y0', 'yaxis', 'ycalendar', 'yhoverformat', 'yperiod', 'yperiod0', 'yperiodalignment', 'ysrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox'

Length of Stay

Status Day 3

Status Day 5

Status Day 7

Status Day 10

analysis <60

analysis in Patients <60

Status Day 3 <60

Status Day 5 <60

Status Day 7 <60

all subjects 3 categories

s3a <- bar3alt + theme(text = element_text(size = 14), legend.position = "none")
s3b <- bar5alt + theme(text = element_text(size = 14), legend.position = "none")
s3c <- bar7alt + theme(text = element_text(size = 14), legend.position = "none")
sup2 <- s3a+s3b+s3c
sup2

s3d <- bar3balt + theme(text = element_text(size = 14), legend.position = "none")
s3e <- bar5balt + theme(text = element_text(size = 14), legend.position = "none")
s3f <- bar7balt + theme(text = element_text(size = 14), legend.position = "none")
sup2a <- s3d+s3e+s3f
sup2a

in subjects <60 years

s4a <- bar360alt + theme(text = element_text(size = 14), legend.position = "none")
s4b <- bar560alt + theme(text = element_text(size = 14), legend.position = "none")
s4c <- bar760alt + theme(text = element_text(size = 14), legend.position = "none")
sup3 <- s4a+s4b+s4c
sup3

s4ab <- bar360balt + theme(text = element_text(size = 14), legend.position = "none")
s4bb <- bar560balt + theme(text = element_text(size = 14), legend.position = "none")
s4cb <- bar760balt + theme(text = element_text(size = 14), legend.position = "none")
sup3b <- s4ab+s4bb+s4cb
sup3b

s360 <- bar360alt + theme(text = element_text(size = 14), legend.position = "none")
s560 <- bar560alt + theme(text = element_text(size = 14), legend.position = "none")
s760 <- bar760alt + theme(text = element_text(size = 14), legend.position = "none")
sup3 <- s360+s560+s760
sup3

Kaplan-Meier Curves

Hazard Ratio & Cox Regression - Days Free of Oxygen

dloSurv <- Surv(df1$dlo, df1$status1)
dloDiff <- survdiff(dloSurv ~ group, data = df1)
dloDiff
## Call:
## survdiff(formula = dloSurv ~ group, data = df1)
## 
##                N Observed Expected (O-E)^2/E (O-E)^2/V
## group=Control 27       27     19.9      2.54       5.7
## group=iNO     27       27     34.1      1.48       5.7
## 
##  Chisq= 5.7  on 1 degrees of freedom, p= 0.02
D1 <- dloDiff$obs[1]
D2 <- dloDiff$obs[2]
E1 <- dloDiff$exp[1]
E2 <- dloDiff$exp[2]
HR <- (D1/D2)/(E1/E2)
HR
## [1] 1.71465
SE_lnHR = sqrt(1/E1 + 1/E2)
SE_lnHR
## [1] 0.282117
L = log(HR)
lower <- exp(L - 1.96*SE_lnHR)
upper <- exp(L + 1.96*SE_lnHR)
ci95 <- c(lower=lower, upper=upper)
ci95
##     lower     upper 
## 0.9863536 2.9806999
z <- coxph(dloSurv ~ group, data = df1)
summary(z)
## Call:
## coxph(formula = dloSurv ~ group, data = df1)
## 
##   n= 54, number of events= 54 
## 
##             coef exp(coef) se(coef)      z Pr(>|z|)  
## groupiNO -0.6374    0.5287   0.2838 -2.246   0.0247 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##          exp(coef) exp(-coef) lower .95 upper .95
## groupiNO    0.5287      1.892    0.3031    0.9221
## 
## Concordance= 0.59  (se = 0.042 )
## Likelihood ratio test= 5  on 1 df,   p=0.03
## Wald test            = 5.04  on 1 df,   p=0.02
## Score (logrank) test = 5.19  on 1 df,   p=0.02

do

doSurv <- Surv(df1$do, df1$status1)
doDiff <- survdiff(doSurv ~ group, data = df1)
doDiff
## Call:
## survdiff(formula = doSurv ~ group, data = df1)
## 
##                N Observed Expected (O-E)^2/E (O-E)^2/V
## group=Control 27       27     31.4     0.628      2.21
## group=iNO     27       27     22.6     0.876      2.21
## 
##  Chisq= 2.2  on 1 degrees of freedom, p= 0.1
D1 <- doDiff$obs[1]
D2 <- doDiff$obs[2]
E1 <- doDiff$exp[1]
E2 <- doDiff$exp[2]
HR <- (D1/D2)/(E1/E2)
HR
## [1] 0.717265
SE_lnHR = sqrt(1/E1 + 1/E2)
SE_lnHR
## [1] 0.2759311
L = log(HR)
lower <- exp(L - 1.96*SE_lnHR)
upper <- exp(L + 1.96*SE_lnHR)
ci95 <- c(lower=lower, upper=upper)
ci95
##     lower     upper 
## 0.4176403 1.2318474
z <- coxph(doSurv ~ group, data = df1)
summary(z)
## Call:
## coxph(formula = doSurv ~ group, data = df1)
## 
##   n= 54, number of events= 54 
## 
##            coef exp(coef) se(coef)     z Pr(>|z|)
## groupiNO 0.3546    1.4257   0.2729 1.299    0.194
## 
##          exp(coef) exp(-coef) lower .95 upper .95
## groupiNO     1.426     0.7014    0.8351     2.434
## 
## Concordance= 0.59  (se = 0.042 )
## Likelihood ratio test= 1.68  on 1 df,   p=0.2
## Wald test            = 1.69  on 1 df,   p=0.2
## Score (logrank) test = 1.71  on 1 df,   p=0.2

Hazard Ratio & Cox Regression - Length of Stay

losSurv <- Surv(df1$los, df1$status)

losDiff <- survdiff(losSurv ~ group, data = df1)

losDiff
## Call:
## survdiff(formula = losSurv ~ group, data = df1)
## 
## n=49, 5 observations deleted due to missingness.
## 
##                N Observed Expected (O-E)^2/E (O-E)^2/V
## group=Control 25       20     26.8      1.73      5.77
## group=iNO     24       22     15.2      3.05      5.77
## 
##  Chisq= 5.8  on 1 degrees of freedom, p= 0.02
D1 <- losDiff$obs[1]
D2 <- losDiff$obs[2]
E1 <- losDiff$exp[1]
E2 <- losDiff$exp[2]
HR <- (D1/D2)/(E1/E2)
HR
## [1] 0.5153699
SE_lnHR = sqrt(1/E1 + 1/E2)
SE_lnHR
## [1] 0.3211165
L = log(HR)
lower <- exp(L - 1.96*SE_lnHR)
upper <- exp(L + 1.96*SE_lnHR)
ci95 <- c(lower=lower, upper=upper)
ci95
##     lower     upper 
## 0.2746497 0.9670723
z <- coxph(losSurv ~ group, data = df1)
summary(z)
## Call:
## coxph(formula = losSurv ~ group, data = df1)
## 
##   n= 49, number of events= 42 
##    (5 observations deleted due to missingness)
## 
##            coef exp(coef) se(coef)     z Pr(>|z|)  
## groupiNO 0.7105    2.0349   0.3120 2.277   0.0228 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##          exp(coef) exp(-coef) lower .95 upper .95
## groupiNO     2.035     0.4914     1.104     3.751
## 
## Concordance= 0.633  (se = 0.04 )
## Likelihood ratio test= 5.14  on 1 df,   p=0.02
## Wald test            = 5.19  on 1 df,   p=0.02
## Score (logrank) test = 5.39  on 1 df,   p=0.02

Post-Hoc Analysis

Subjects < 60 years

##                                            Stratified by grupo
##                                             Control                 iNO                     p      test   
##   n                                             18                      16                                
##   Sex = Male (%)                                15 (83.3)               12 (75.0)            0.861        
##   Age (median [IQR])                         43.50 [37.25, 52.75]    40.50 [35.75, 51.75]    0.849 nonnorm
##   Weight (median [IQR])                      93.00 [82.25, 106.50]   93.50 [85.00, 100.00]   0.863 nonnorm
##   Height (median [IQR])                     170.00 [165.50, 179.75] 180.00 [167.75, 183.00]  0.201 nonnorm
##   BMI (median [IQR])                         31.86 [29.42, 33.36]    30.60 [26.71, 33.32]    0.417 nonnorm
##   obesity (%)                                                                                0.518        
##      Healthy weight                              0 ( 0.0)                1 ( 6.2)                         
##      Obesity                                    12 (66.7)                9 (56.2)                         
##      Overweight                                  6 (33.3)                6 (37.5)                         
##   race (%)                                                                                   0.086        
##      Black                                       1 ( 5.6)                3 (18.8)                         
##      Brown                                       4 (22.2)                0 ( 0.0)                         
##      White                                      13 (72.2)               13 (81.2)                         
##   Tobacco use = Yes (%)                          1 ( 5.6)                1 ( 6.2)            1.000        
##   Alcohol use = 1 (%)                            7 (38.9)                9 (56.2)            0.504        
##   Symptoms(days) (median [IQR])               9.00 [8.00, 10.00]      9.00 [8.00, 10.50]     0.807 nonnorm
##   Resp Symptoms(days) (median [IQR])          3.00 [2.00, 5.75]       4.00 [2.75, 6.00]      0.577 nonnorm
##   status_vacinal = No COVID vaccine (%)         14 (93.3)                8 (61.5)            0.113        
##   Antiinflamatorio = Yes (%)                    12 (66.7)                9 (56.2)            0.787        
##   Azitromicina = Yes (%)                        13 (72.2)               10 (62.5)            0.812        
##   Antibioticos = Yes (%)                         4 (22.2)                4 (25.0)            1.000        
##   Hidroxicloroquina = Yes (%)                    5 (27.8)                1 ( 6.2)            0.233        
##   Corticoide = Yes (%)                          14 (77.8)                8 (50.0)            0.183        
##   Nenhum = Yes (%)                               0 ( 0.0)                2 (12.5)            0.414        
##   Comorbidities = Yes (%)                        7 (38.9)                5 (31.2)            0.916        
##   has = Yes (%)                                  7 (38.9)                5 (31.2)            0.916        
##   chf = Yes (%)                                  0 ( 0.0)                0 ( 0.0)              NaN        
##   dm1 = Yes (%)                                  1 ( 5.6)                1 ( 6.2)            1.000        
##   dm2 = Yes (%)                                  3 (16.7)                0 ( 0.0)            0.269        
##   satpo2_ar_ambiente (median [IQR])          90.00 [88.50, 91.00]    90.00 [89.00, 92.50]    0.629 nonnorm
##   C-reactive_protein (median [IQR])           8.55 [5.28, 21.53]      8.20 [3.48, 24.48]     0.743 nonnorm
##   D-dimer (median [IQR])                    601.50 [320.75, 791.25] 741.00 [482.00, 920.50]  0.301 nonnorm
##   CT: pulmonary involvement% (median [IQR])  50.00 [40.00, 63.75]    42.50 [30.00, 50.00]    0.162 nonnorm
##                                                      Stratified by grupo
##                                                       Control            iNO                 p      test   
##   n                                                     18                  16                             
##   Days Free of Vent Support (median [IQR])            8.50 [1.25, 10.00] 11.50 [9.00, 13.25]  0.013 nonnorm
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]   4.00 [2.75, 4.00]   0.003 nonnorm
##   Score Day 5 (median [IQR])                          4.50 [4.00, 5.00]   2.50 [2.00, 4.00]   0.017 nonnorm
##   Score Day 7 (median [IQR])                          3.50 [2.25, 5.00]   2.00 [1.75, 3.00]   0.110 nonnorm
##   worsening = Yes (%)                                    9 ( 50.0)           4 (25.0)         0.253        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   18 (100.0)           9 (56.2)         0.006        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)   14 ( 77.8)           7 (43.8)         0.092        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    9 ( 50.0)           3 (18.8)         0.123        
##   mech_vent = Yes (%)                                    4 ( 22.2)           2 (12.5)         0.771        
##   Length of Stay (Days) (median [IQR])                7.00 [6.00, 11.00]  4.00 [2.00, 6.00]   0.004 nonnorm
##   Death = Yes (%)                                        1 (  5.6)           1 ( 6.2)         1.000

subgroup analysis in patients with 60 years or more

##                                                      Stratified by grupo
##                                                       Control            iNO                p      test   
##   n                                                      9                 11                             
##   Days Free of Vent Support (median [IQR])            8.00 [7.00, 12.00] 9.00 [3.50, 11.50]  0.939 nonnorm
##   Score Day 3 (median [IQR])                          4.00 [4.00, 4.00]  4.00 [4.00, 4.00]   0.963 nonnorm
##   Score Day 5 (median [IQR])                          4.00 [3.00, 4.00]  4.00 [3.00, 4.50]   0.937 nonnorm
##   Score Day 7 (median [IQR])                          4.00 [2.00, 4.00]  2.00 [1.50, 4.50]   0.438 nonnorm
##   worsening = Yes (%)                                    2 (22.2)           3 (27.3)         1.000        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)    8 (88.9)           9 (81.8)         1.000        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)    6 (66.7)           6 (54.5)         0.927        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    5 (55.6)           4 (36.4)         0.684        
##   mech_vent = Yes (%)                                    1 (11.1)           3 (27.3)         0.736        
##   Length of Stay (Days) (median [IQR])                7.00 [5.50, 7.25]  5.00 [4.00, 7.00]   0.527 nonnorm
##   Death = Yes (%)                                        1 (12.5)           2 (18.2)         1.000

clinical score <60

clinical score >=60 years

Subjects <60 years

Days Free of Respiratory Support

Length of Stay

estimate .y. group1 group2 n1 n2 statistic p conf.low conf.high method alternative
-3.000021 dlo Control iNO 18 16 73 0.0142 -6.000013 -0.9999679 Wilcoxon two.sided
estimate .y. group1 group2 n1 n2 statistic p conf.low conf.high method alternative
3.999962 los Control iNO 17 15 203 0.00439 1.000032 6.000016 Wilcoxon two.sided

hh <- df %>% select(grupo, do)

ggplot(data = hh, aes(x = do, fill = grupo)) +
geom_histogram(data = subset(hh, grupo == "Control"), binwidth = 1, color="white", position = "identity") +
geom_histogram(data = subset(hh, grupo == "iNO"), binwidth = 1, color="white", position = "identity",
mapping = aes(y = - ..count.. )) +
scale_x_continuous("Days", breaks = c(seq(0, 15, by=1))) +
scale_y_continuous("Groups", breaks = seq(-10, 10, 2), labels = abs) +
scale_fill_discrete(name = "Grupo") +
coord_flip() +
theme_bw()
## Warning: The dot-dot notation (`..count..`) was deprecated in ggplot2 3.4.0.
## ℹ Please use `after_stat(count)` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.

save(df, file="df.Rdata")

kaplan-meier

library(survival)
library(survminer)

# load("E:/OneDrive - PUCRS - BR/$$-COVID-19/R/df1.Rdata")
load("df1.Rdata")

# do
fit <- survfit(Surv(do, status) ~ group, data = df1)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE, log.rank.weights = "n", pval.method.coord = c(5, 0.1), pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "S1", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "S2", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "sqrtN", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "1", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

# los

fit <- survfit(Surv(los, status) ~ group, data = df1)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "n", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "S1", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "S2", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "sqrtN", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

ggsurvplot(fit, data = df1, pval = TRUE, pval.method = TRUE,
           log.rank.weights = "1", pval.method.coord = c(5, 0.1),
           pval.method.size = 3)

# https://cran.r-project.org/web/packages/survminer/vignettes/Specifiying_weights_in_log-rank_comparisons.html

==========================

analisys in <60 years

==========================

SUBGROUP ANALYSIS: Demographics in <60 years

##                                            Stratified by grupo
##                                             Control                 iNO                     p      test   
##   n                                             18                      16                                
##   Sex = Male (%)                                15 (83.3)               12 (75.0)            0.861        
##   Age (median [IQR])                         43.50 [37.25, 52.75]    40.50 [35.75, 51.75]    0.849 nonnorm
##   Weight (median [IQR])                      93.00 [82.25, 106.50]   93.50 [85.00, 100.00]   0.863 nonnorm
##   Height (median [IQR])                     170.00 [165.50, 179.75] 180.00 [167.75, 183.00]  0.201 nonnorm
##   BMI (median [IQR])                         31.86 [29.42, 33.36]    30.60 [26.71, 33.32]    0.417 nonnorm
##   obesity (%)                                                                                0.518        
##      Healthy weight                              0 ( 0.0)                1 ( 6.2)                         
##      Obesity                                    12 (66.7)                9 (56.2)                         
##      Overweight                                  6 (33.3)                6 (37.5)                         
##   race (%)                                                                                   0.086        
##      Black                                       1 ( 5.6)                3 (18.8)                         
##      Brown                                       4 (22.2)                0 ( 0.0)                         
##      White                                      13 (72.2)               13 (81.2)                         
##   Tobacco use = Yes (%)                          1 ( 5.6)                1 ( 6.2)            1.000        
##   Alcohol use = 1 (%)                            7 (38.9)                9 (56.2)            0.504        
##   Symptoms(days) (median [IQR])               9.00 [8.00, 10.00]      9.00 [8.00, 10.50]     0.807 nonnorm
##   Resp Symptoms(days) (median [IQR])          3.00 [2.00, 5.75]       4.00 [2.75, 6.00]      0.577 nonnorm
##   status_vacinal = No COVID vaccine (%)         14 (93.3)                8 (61.5)            0.113        
##   Antiinflamatorio = Yes (%)                    12 (66.7)                9 (56.2)            0.787        
##   Azitromicina = Yes (%)                        13 (72.2)               10 (62.5)            0.812        
##   Antibioticos = Yes (%)                         4 (22.2)                4 (25.0)            1.000        
##   Hidroxicloroquina = Yes (%)                    5 (27.8)                1 ( 6.2)            0.233        
##   Corticoide = Yes (%)                          14 (77.8)                8 (50.0)            0.183        
##   Nenhum = Yes (%)                               0 ( 0.0)                2 (12.5)            0.414        
##   Comorbidities = Yes (%)                        7 (38.9)                5 (31.2)            0.916        
##   has = Yes (%)                                  7 (38.9)                5 (31.2)            0.916        
##   chf = Yes (%)                                  0 ( 0.0)                0 ( 0.0)              NaN        
##   dm1 = Yes (%)                                  1 ( 5.6)                1 ( 6.2)            1.000        
##   dm2 = Yes (%)                                  3 (16.7)                0 ( 0.0)            0.269        
##   satpo2_ar_ambiente (median [IQR])          90.00 [88.50, 91.00]    90.00 [89.00, 92.50]    0.629 nonnorm
##   C-reactive_protein (median [IQR])           8.55 [5.28, 21.53]      8.20 [3.48, 24.48]     0.743 nonnorm
##   D-dimer (median [IQR])                    601.50 [320.75, 791.25] 741.00 [482.00, 920.50]  0.301 nonnorm
##   CT: pulmonary involvement% (median [IQR])  50.00 [40.00, 63.75]    42.50 [30.00, 50.00]    0.162 nonnorm

Primary and secondary outcomes in <60 years

##                                                      Stratified by grupo
##                                                       Control            iNO                 p      test   
##   n                                                     18                  16                             
##   Days Free of Vent Support (median [IQR])            8.50 [1.25, 10.00] 11.50 [9.00, 13.25]  0.013 nonnorm
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]   4.00 [2.75, 4.00]   0.003 nonnorm
##   Score Day 5 (median [IQR])                          4.50 [4.00, 5.00]   2.50 [2.00, 4.00]   0.017 nonnorm
##   Score Day 7 (median [IQR])                          3.50 [2.25, 5.00]   2.00 [1.75, 3.00]   0.110 nonnorm
##   worsening = Yes (%)                                    9 ( 50.0)           4 (25.0)         0.253        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   18 (100.0)           9 (56.2)         0.006        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)   14 ( 77.8)           7 (43.8)         0.092        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    9 ( 50.0)           3 (18.8)         0.123        
##   mech_vent = Yes (%)                                    4 ( 22.2)           2 (12.5)         0.771        
##   Length of Stay (Days) (median [IQR])                7.00 [6.00, 11.00]  4.00 [2.00, 6.00]   0.004 nonnorm
##   Death = Yes (%)                                        1 (  5.6)           1 ( 6.2)         1.000

SUBGROUP ANALYSIS: Demographics in 60 years or more

##                                            Stratified by grupo
##                                             Control                 iNO                      p      test   
##   n                                              9                      11                                 
##   Sex = Male (%)                                 3 (33.3)                7 (63.6)             0.369        
##   Age (median [IQR])                         68.00 [65.00, 73.00]    63.00 [62.00, 73.50]     0.195 nonnorm
##   Weight (median [IQR])                      80.00 [78.00, 85.00]    85.00 [79.50, 87.00]     0.446 nonnorm
##   Height (median [IQR])                     157.00 [154.00, 167.00] 170.00 [162.50, 173.00]   0.044 nonnorm
##   BMI (median [IQR])                         32.44 [28.68, 34.99]    29.41 [27.76, 31.44]     0.271 nonnorm
##   obesity (%)                                                                                 0.495        
##      Healthy weight                              0 ( 0.0)                1 ( 9.1)                          
##      Obesity                                     6 (66.7)                5 (45.5)                          
##      Overweight                                  3 (33.3)                5 (45.5)                          
##   race (%)                                                                                    0.904        
##      Black                                       1 (11.1)                2 (18.2)                          
##      Brown                                       1 (11.1)                1 ( 9.1)                          
##      White                                       7 (77.8)                8 (72.7)                          
##   Tobacco use = Yes (%)                          0 ( 0.0)                0 ( 0.0)               NaN        
##   Alcohol use = 1 (%)                            1 (11.1)                4 (36.4)             0.436        
##   Symptoms(days) (median [IQR])               8.00 [5.00, 9.00]      10.00 [8.00, 11.00]      0.117 nonnorm
##   Resp Symptoms(days) (median [IQR])          3.00 [2.00, 4.00]       4.00 [2.00, 4.00]       0.482 nonnorm
##   status_vacinal = No COVID vaccine (%)          3 (33.3)                8 (72.7)             0.190        
##   Antiinflamatorio = Yes (%)                     3 (33.3)                6 (54.5)             0.619        
##   Azitromicina = Yes (%)                         2 (22.2)                7 (63.6)             0.161        
##   Antibioticos = Yes (%)                         2 (22.2)                1 ( 9.1)             0.850        
##   Hidroxicloroquina = Yes (%)                    0 ( 0.0)                2 (18.2)             0.549        
##   Corticoide = Yes (%)                           1 (11.1)                6 (54.5)             0.120        
##   Nenhum = Yes (%)                               2 (22.2)                1 ( 9.1)             0.850        
##   Comorbidities = Yes (%)                        6 (66.7)                4 (36.4)             0.369        
##   has = Yes (%)                                  6 (66.7)                4 (36.4)             0.369        
##   chf = Yes (%)                                  1 (11.1)                0 ( 0.0)             0.918        
##   dm1 = Yes (%)                                  1 (11.1)                0 ( 0.0)             0.918        
##   dm2 = Yes (%)                                  3 (33.3)                0 ( 0.0)             0.148        
##   satpo2_ar_ambiente (median [IQR])          90.00 [89.00, 91.00]    91.00 [91.00, 92.00]     0.102 nonnorm
##   C-reactive_protein (median [IQR])           5.60 [3.40, 8.70]       7.60 [6.05, 7.95]       0.342 nonnorm
##   D-dimer (median [IQR])                    605.00 [451.50, 701.25] 956.00 [678.25, 2024.25]  0.062 nonnorm
##   CT: pulmonary involvement% (median [IQR])  30.00 [25.00, 45.00]    50.00 [47.50, 55.00]     0.028 nonnorm

subgroup analysis in patients with 60 years or more

##                                                      Stratified by grupo
##                                                       Control            iNO                p      test   
##   n                                                      9                 11                             
##   Days Free of Vent Support (median [IQR])            8.00 [7.00, 12.00] 9.00 [3.50, 11.50]  0.939 nonnorm
##   Score Day 3 (median [IQR])                          4.00 [4.00, 4.00]  4.00 [4.00, 4.00]   0.963 nonnorm
##   Score Day 5 (median [IQR])                          4.00 [3.00, 4.00]  4.00 [3.00, 4.50]   0.937 nonnorm
##   Score Day 7 (median [IQR])                          4.00 [2.00, 4.00]  2.00 [1.50, 4.50]   0.438 nonnorm
##   worsening = Yes (%)                                    2 (22.2)           3 (27.3)         1.000        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)    8 (88.9)           9 (81.8)         1.000        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)    6 (66.7)           6 (54.5)         0.927        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    5 (55.6)           4 (36.4)         0.684        
##   mech_vent = Yes (%)                                    1 (11.1)           3 (27.3)         0.736        
##   Length of Stay (Days) (median [IQR])                7.00 [5.50, 7.25]  5.00 [4.00, 7.00]   0.527 nonnorm
##   Death = Yes (%)                                        1 (12.5)           2 (18.2)         1.000

clinical score <60

SUBGROUP ANALYSIS

PATIENTS WITH COMORBIDITIES

##                                                      Stratified by grupo
##                                                       Control            iNO                 p     
##   n                                                     13                   9                     
##   Days Free of Vent Support (median [IQR])            9.00 [7.00, 11.00] 10.00 [0.00, 13.00]  0.711
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]   4.00 [3.00, 4.00]   0.304
##   Score Day 5 (median [IQR])                          4.00 [3.00, 5.00]   4.00 [2.00, 5.00]   0.733
##   Score Day 7 (median [IQR])                          2.00 [2.00, 4.00]   2.00 [2.00, 5.00]   0.837
##   worsening = Yes (%)                                    4 (30.8)            3 (33.3)         1.000
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   12 (92.3)            6 (66.7)         0.332
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)    8 (61.5)            5 (55.6)         1.000
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    6 (46.2)            3 (33.3)         0.873
##   mech_vent = Yes (%)                                    2 (15.4)            3 (33.3)         0.638
##   Length of Stay (Days) (median [IQR])                6.00 [4.50, 7.50]   4.00 [3.00, 6.00]   0.291
##   Death = Yes (%)                                        2 (16.7)            2 (22.2)         1.000
##                                                      Stratified by grupo
##                                                       test   
##   n                                                          
##   Days Free of Vent Support (median [IQR])            nonnorm
##   Score Day 3 (median [IQR])                          nonnorm
##   Score Day 5 (median [IQR])                          nonnorm
##   Score Day 7 (median [IQR])                          nonnorm
##   worsening = Yes (%)                                        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)        
##   mech_vent = Yes (%)                                        
##   Length of Stay (Days) (median [IQR])                nonnorm
##   Death = Yes (%)

PATIENTS WITHOUT COMORBIDITIES

##                                                      Stratified by grupo
##                                                       Control            iNO                 p     
##   n                                                     14                  18                     
##   Days Free of Vent Support (median [IQR])            8.00 [0.00, 9.75]  11.00 [9.00, 13.00]  0.021
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]   4.00 [3.00, 4.00]   0.014
##   Score Day 5 (median [IQR])                          4.50 [4.00, 5.00]   3.00 [2.00, 4.00]   0.010
##   Score Day 7 (median [IQR])                          4.00 [3.00, 5.00]   2.00 [1.25, 3.00]   0.010
##   worsening = Yes (%)                                    7 ( 50.0)           4 (22.2)         0.205
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   14 (100.0)          12 (66.7)         0.052
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)   12 ( 85.7)           8 (44.4)         0.043
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    8 ( 57.1)           4 (22.2)         0.098
##   mech_vent = Yes (%)                                    3 ( 21.4)           2 (11.1)         0.759
##   Length of Stay (Days) (median [IQR])                7.50 [7.00, 18.75]  5.00 [3.00, 7.00]   0.002
##   Death = Yes (%)                                        0 (  0.0)           1 ( 5.6)         1.000
##                                                      Stratified by grupo
##                                                       test   
##   n                                                          
##   Days Free of Vent Support (median [IQR])            nonnorm
##   Score Day 3 (median [IQR])                          nonnorm
##   Score Day 5 (median [IQR])                          nonnorm
##   Score Day 7 (median [IQR])                          nonnorm
##   worsening = Yes (%)                                        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)        
##   mech_vent = Yes (%)                                        
##   Length of Stay (Days) (median [IQR])                nonnorm
##   Death = Yes (%)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  df_comorb_n$dlo by df_comorb_n$grupo
## W = 66, p-value = 0.02235
## alternative hypothesis: true location shift is not equal to 0
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  df_comorb_n$score_dia3 by df_comorb_n$grupo
## W = 183.5, p-value = 0.01464
## alternative hypothesis: true location shift is not equal to 0
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  df_comorb_n$score_dia5 by df_comorb_n$grupo
## W = 192, p-value = 0.01055
## alternative hypothesis: true location shift is not equal to 0
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  df_comorb_n$score_dia7 by df_comorb_n$grupo
## W = 193, p-value = 0.0102
## alternative hypothesis: true location shift is not equal to 0

PATIENTS –> MALE

##                                                      Stratified by grupo
##                                                       Control            iNO                 p     
##   n                                                     18                  19                     
##   Days Free of Vent Support (median [IQR])            9.00 [1.25, 11.00] 10.00 [5.50, 12.50]  0.289
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]   4.00 [3.50, 4.00]   0.083
##   Score Day 5 (median [IQR])                          4.00 [3.00, 5.00]   4.00 [2.00, 4.50]   0.279
##   Score Day 7 (median [IQR])                          3.00 [2.00, 5.00]   2.00 [2.00, 4.50]   0.642
##   worsening = Yes (%)                                    8 (44.4)            5 (26.3)         0.418
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   17 (94.4)           14 (73.7)         0.205
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)   12 (66.7)           10 (52.6)         0.593
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    8 (44.4)            6 (31.6)         0.640
##   mech_vent = Yes (%)                                    3 (16.7)            4 (21.1)         1.000
##   Length of Stay (Days) (median [IQR])                7.00 [5.00, 11.00]  4.50 [2.75, 6.25]   0.050
##   Death = Yes (%)                                        1 ( 5.6)            3 (15.8)         0.637
##                                                      Stratified by grupo
##                                                       test   
##   n                                                          
##   Days Free of Vent Support (median [IQR])            nonnorm
##   Score Day 3 (median [IQR])                          nonnorm
##   Score Day 5 (median [IQR])                          nonnorm
##   Score Day 7 (median [IQR])                          nonnorm
##   worsening = Yes (%)                                        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)        
##   mech_vent = Yes (%)                                        
##   Length of Stay (Days) (median [IQR])                nonnorm
##   Death = Yes (%)

PATIENTS –> FEMALE

##                                                      Stratified by grupo
##                                                       Control           iNO                 p     
##   n                                                      9                  8                     
##   Days Free of Vent Support (median [IQR])            8.00 [7.00, 9.00] 12.00 [9.00, 13.25]  0.033
##   Score Day 3 (median [IQR])                          4.00 [4.00, 5.00]  3.50 [3.00, 4.00]   0.040
##   Score Day 5 (median [IQR])                          4.00 [4.00, 5.00]  3.00 [2.00, 4.00]   0.012
##   Score Day 7 (median [IQR])                          4.00 [3.00, 4.00]  1.50 [1.00, 2.25]   0.016
##   worsening = Yes (%)                                    3 ( 33.3)          2 (25.0)         1.000
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)    9 (100.0)          4 (50.0)         0.064
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)    8 ( 88.9)          3 (37.5)         0.088
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)    6 ( 66.7)          1 (12.5)         0.076
##   mech_vent = Yes (%)                                    2 ( 22.2)          1 (12.5)         1.000
##   Length of Stay (Days) (median [IQR])                7.00 [7.00, 8.00]  4.50 [3.00, 6.25]   0.022
##   Death = Yes (%)                                        1 ( 12.5)          0 ( 0.0)         1.000
##                                                      Stratified by grupo
##                                                       test   
##   n                                                          
##   Days Free of Vent Support (median [IQR])            nonnorm
##   Score Day 3 (median [IQR])                          nonnorm
##   Score Day 5 (median [IQR])                          nonnorm
##   Score Day 7 (median [IQR])                          nonnorm
##   worsening = Yes (%)                                        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)        
##   mech_vent = Yes (%)                                        
##   Length of Stay (Days) (median [IQR])                nonnorm
##   Death = Yes (%)

PATIENTS WITH OBESITY

##                                                      Stratified by grupo
##                                                       Control            iNO                 p     
##   n                                                     18                  14                     
##   Days Free of Vent Support (median [IQR])            7.50 [1.25, 9.00]  12.00 [5.25, 13.00]  0.052
##   Score Day 3 (median [IQR])                          4.50 [4.00, 5.00]   3.50 [3.00, 4.00]   0.006
##   Score Day 5 (median [IQR])                          4.50 [4.00, 5.00]   3.00 [2.00, 4.00]   0.010
##   Score Day 7 (median [IQR])                          4.00 [2.25, 5.00]   2.00 [1.25, 4.50]   0.164
##   worsening = Yes (%)                                    9 (50.0)            5 (35.7)         0.653
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)   17 (94.4)            7 (50.0)         0.014
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)   15 (83.3)            6 (42.9)         0.044
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)   12 (66.7)            4 (28.6)         0.075
##   mech_vent = Yes (%)                                    5 (27.8)            3 (21.4)         1.000
##   Length of Stay (Days) (median [IQR])                7.50 [6.00, 10.25]  4.00 [2.00, 6.00]   0.021
##   Death = Yes (%)                                        2 (11.8)            1 ( 7.1)         1.000
##                                                      Stratified by grupo
##                                                       test   
##   n                                                          
##   Days Free of Vent Support (median [IQR])            nonnorm
##   Score Day 3 (median [IQR])                          nonnorm
##   Score Day 5 (median [IQR])                          nonnorm
##   Score Day 7 (median [IQR])                          nonnorm
##   worsening = Yes (%)                                        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)        
##   mech_vent = Yes (%)                                        
##   Length of Stay (Days) (median [IQR])                nonnorm
##   Death = Yes (%)

PATIENTS WITHOUT OBESITY

##                                                      Stratified by grupo
##                                                       Control             iNO                
##   n                                                       9                  13              
##   Days Free of Vent Support (median [IQR])            10.00 [9.00, 12.00] 10.00 [9.00, 12.00]
##   Score Day 3 (median [IQR])                           4.00 [4.00, 4.00]   4.00 [4.00, 4.00] 
##   Score Day 5 (median [IQR])                           4.00 [2.00, 4.00]   4.00 [3.00, 4.00] 
##   Score Day 7 (median [IQR])                           3.00 [2.00, 3.00]   2.00 [2.00, 3.00] 
##   worsening = Yes (%)                                     2 ( 22.2)           2 (15.4)       
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)     9 (100.0)          11 (84.6)       
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)     5 ( 55.6)           7 (53.8)       
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)     2 ( 22.2)           3 (23.1)       
##   mech_vent = Yes (%)                                     0 (  0.0)           2 (15.4)       
##   Length of Stay (Days) (median [IQR])                 7.00 [4.00, 7.00]   5.00 [4.00, 6.50] 
##   Death = Yes (%)                                         0 (  0.0)           2 (15.4)       
##                                                      Stratified by grupo
##                                                       p      test   
##   n                                                                 
##   Days Free of Vent Support (median [IQR])             0.946 nonnorm
##   Score Day 3 (median [IQR])                           1.000 nonnorm
##   Score Day 5 (median [IQR])                           0.945 nonnorm
##   Score Day 7 (median [IQR])                           0.537 nonnorm
##   worsening = Yes (%)                                  1.000        
##   Supplemental oxygen Day 3 = Supplemental oxygen (%)  0.631        
##   Supplemental oxygen Day 5 = Supplemental oxygen (%)  1.000        
##   Supplemental oxygen Day 7 = Supplemental oxygen (%)  1.000        
##   mech_vent = Yes (%)                                  0.631        
##   Length of Stay (Days) (median [IQR])                 0.246 nonnorm
##   Death = Yes (%)                                      0.631

export data for Mario Wagner’s analysis

dfz <- df %>% select(record_id, sexo, grupo, idade, comorb, dlo, los)
dfz$age_group[dfz$idade<60] <- "Young"
## Warning: Unknown or uninitialised column: `age_group`.
dfz$age_group[dfz$idade>=60] <- "Senior"
dfz$age_group <- as.factor(dfz$age_group)

save(dfz, file="dfz.Rdata")
Sys.Date()
## [1] "2024-07-04"