NORSE - pSERG

Install needed packages

This step loads packages with functions needed for analysis and that are not present in base R.

#install.packages(RVAideMemoire)
library(RVAideMemoire)
## Warning: package 'RVAideMemoire' was built under R version 3.6.3
## *** Package RVAideMemoire v 0.9-78 ***
#install.packages(gdata)
library(gdata)
## Warning: package 'gdata' was built under R version 3.6.3
## gdata: Unable to locate valid perl interpreter
## gdata: 
## gdata: read.xls() will be unable to read Excel XLS and XLSX files
## gdata: unless the 'perl=' argument is used to specify the location of a
## gdata: valid perl intrpreter.
## gdata: 
## gdata: (To avoid display of this message in the future, please ensure
## gdata: perl is installed and available on the executable search path.)
## gdata: Unable to load perl libaries needed by read.xls()
## gdata: to support 'XLX' (Excel 97-2004) files.
## 
## gdata: Unable to load perl libaries needed by read.xls()
## gdata: to support 'XLSX' (Excel 2007+) files.
## 
## gdata: Run the function 'installXLSXsupport()'
## gdata: to automatically download and install the perl
## gdata: libaries needed to support Excel XLS and XLSX formats.
## 
## Attaching package: 'gdata'
## The following object is masked from 'package:stats':
## 
##     nobs
## The following object is masked from 'package:utils':
## 
##     object.size
## The following object is masked from 'package:base':
## 
##     startsWith
#install.packages(gmodels)
library(gmodels)
## Warning: package 'gmodels' was built under R version 3.6.3
#install.packages(ggplot2)
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.6.3

##Load database

norse = read.csv("C:\\Users\\crist\\Desktop\\NORSE dataset.csv")

##Variable transformation and description

dim(norse)
## [1] 40 30
head(norse)
##   cases classification   Age Sex Prodromes Prior.fever Fever.onset Nb.AED
## 1     1             PF  9.25   1         1           1           1      1
## 2     2             NF 10.25   0         0           0           0      2
## 3     3              F  1.10   1         0           0           1      2
## 4     5             PF  3.80   1         1           1           1      4
## 5     7              F  1.60   0         1           0           1      2
## 6     8             PF  8.60   1         1           1           1      3
##   Nb.cont KD Plasmaph STEROIDS IVIG ImTh  X FLAIR DWI MRI CSF.WC CSF.prot CSF
## 1       2  0       NA        1    1    1 NA     1   1   0      1       NA   1
## 2       0  0       NA        1   NA    1 NA     1  NA   0      1        0   0
## 3       0  0       NA       NA   NA    0 NA    NA  NA   1      1        1   1
## 4       4  1        1        1    1    1 NA     1   1   0      0        0   0
## 5       0  0       NA       NA   NA    0 NA    NA  NA   1      0        1   0
## 6       3  1       NA        1    1    1 NA    NA  NA   1      0        0   0
##   sporadic.discharges EEG.intericatl.period EEG.Sz EEG ICUdur Convulsdur SEdur
## 1                   0                     0      1   0     42         18  1200
## 2                   1                     0      0   0      2        120    24
## 3                   0                     0      0   1      3        135    36
## 4                   0                     1      0   0     49      72000    NA
## 5                   0                     0      0   1      2        240     8
## 6                   1                     1      0   0     57      12960   672
##   AE Outcome
## 1  1       0
## 2  0       1
## 3  0       1
## 4  1       0
## 5  1       1
## 6  1       0
##Variables class transformation and description
#Age
norse$Age<-as.numeric(norse$Age)
summary(norse$Age)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.200   1.100   2.250   4.357   6.875  15.300
#Description of age by subgroup
summary(norse[which(norse$classification== "F"),]$Age)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.200   0.950   1.200   2.058   1.750  13.200
norse[which(norse$classification== "F"),]$Age
##  [1]  1.10  1.60  0.60  1.25 13.20  1.20  0.90  0.75  1.90  1.00  3.30  0.90
## [13]  1.20  0.20  1.10  1.00  4.50  1.20  2.20
norse[which(norse$classification== "PF"),]$Age
##  [1]  9.25  3.80  8.60 10.60 15.30  5.40  6.30  5.20  1.80  2.50  0.25  0.80
## [13]  8.80  2.30  5.10 11.70
#SE duration
norse$SEdur<-as.numeric(norse$SEdur)
summary(norse$SEdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    6.00   19.00  273.03   96.75 2784.00       8
#Description of seizure duration by subgroup
summary(norse[which(norse$classification== "PF"),]$SEdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##     1.0   103.5   684.0   821.7  1158.0  2784.0       6
summary(norse[which(norse$classification== "F"),]$SEdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   4.125  10.250  25.894  33.000 144.000       1
#Outcome
norse$Outcome<-as.factor(as.character(norse$Outcome))
class(norse$Outcome)
## [1] "factor"
CrossTable(norse$Outcome)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        15 |        25 | 
##           |     0.375 |     0.625 | 
##           |-----------|-----------|
## 
## 
## 
## 
#Classification (subgroups by fever)
norse$classification<-as.character(norse$classification)
CrossTable(norse$classification)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         F |        NF |        PF | 
##           |-----------|-----------|-----------|
##           |        19 |         5 |        16 | 
##           |     0.475 |     0.125 |     0.400 | 
##           |-----------|-----------|-----------|
## 
## 
## 
## 
#Presence of fever at SE onset
norse$Fever.onset<-as.character(norse$Fever.onset)
CrossTable(norse$Fever.onset)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |         9 |        31 | 
##           |     0.225 |     0.775 | 
##           |-----------|-----------|
## 
## 
## 
## 
#EEG
norse$EEG<-as.character(norse$EEG)
CrossTable(norse$EEG)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  36 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        16 |        20 | 
##           |     0.444 |     0.556 | 
##           |-----------|-----------|
## 
## 
## 
## 
#CSF
norse$CSF<-as.character(norse$CSF)
CrossTable(norse$CSF)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  35 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        12 |        23 | 
##           |     0.343 |     0.657 | 
##           |-----------|-----------|
## 
## 
## 
## 
#ICU lenght of stay
norse$ICUdur<-as.numeric(norse$ICUdur)
summary(norse$ICUdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    1.50    3.00   19.85   33.00  100.00       1
#Number of AEDs
norse$Nb.AED<-as.numeric(norse$Nb.AED)
summary(norse$Nb.AED)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   1.750   2.000   2.225   2.250   8.000
#MRI
norse$MRI<-as.character(norse$MRI)
CrossTable(norse$MRI)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  31 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        16 |        15 | 
##           |     0.516 |     0.484 | 
##           |-----------|-----------|
## 
## 
## 
## 
#Ketogenic diet
norse$KD<-as.character(norse$KD)
CrossTable(norse$KD)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        31 |         9 | 
##           |     0.775 |     0.225 | 
##           |-----------|-----------|
## 
## 
## 
## 
#Immunotherapy
norse$ImTh<-as.character(norse$ImTh)
CrossTable(norse$ImTh)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        28 |        12 | 
##           |     0.700 |     0.300 | 
##           |-----------|-----------|
## 
## 
## 
## 
#Antiseizure medications
norse$AE<-as.character(norse$AE)
CrossTable(norse$AE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        23 |        17 | 
##           |     0.575 |     0.425 | 
##           |-----------|-----------|
## 
## 
## 
## 
#Create variable prodromes
norse$Prodromes <- ifelse(norse$Prodromes=="1", 1, 0)
CrossTable(norse$Prodromes)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        17 |        23 | 
##           |     0.425 |     0.575 | 
##           |-----------|-----------|
## 
## 
## 
## 
#Create variable for subgroup "no fever"
norse$No.fever <- ifelse(norse$Prior.fever=="0" & norse$Fever.onset=="0", 1, 0)
CrossTable(norse$No.fever)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##           |         0 |         1 | 
##           |-----------|-----------|
##           |        35 |         5 | 
##           |     0.875 |     0.125 | 
##           |-----------|-----------|
## 
## 
## 
## 

##Univariate analysis + Bonferroni correction

# Qualitative variables (comparison of NORSE subgroups)
fisher.multcomp(table(norse$classification, norse$Prodromes),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$Prodromes)
## 
##            F       NF
## NF 1.000e+00        -
## PF 5.627e-05 0.002506
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$Fever.onset),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$Fever.onset)
## 
##            F      NF
## NF 7.058e-05       -
## PF 1.043e-01 0.01858
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$EEG),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$EEG)
## 
##          F     NF
## NF 1.00000      -
## PF 0.01154 0.8694
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$MRI),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$MRI)
## 
##           F NF
## NF 0.026374  -
## PF 0.001911  1
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$CSF),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$CSF)
## 
##           F NF
## NF 0.894737  -
## PF 0.006161  1
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$KD),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$KD)
## 
##            F     NF
## NF 1.0000000      -
## PF 0.0004861 0.1353
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$ImTh),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$ImTh)
## 
##            F     NF
## NF 6.250e-01      -
## PF 3.141e-05 0.3582
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$Outcome),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$Outcome)
## 
##            F     NF
## NF 1.0000000      -
## PF 0.0004314 0.1424
## 
## P value adjustment method: bonferroni
fisher.multcomp(table(norse$classification, norse$AE),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$classification,norse$AE)
## 
##            F      NF
## NF 1.0000000       -
## PF 0.0004629 0.07534
## 
## P value adjustment method: bonferroni
fires <- subset(norse, norse$classification=="PF")
table(fires$classification, fires$Prodromes)
##     
##       1
##   PF 16
# Quantitative variables (comparison of NORSE subgroups)
kruskal.test(norse$Age, norse$classification)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  norse$Age and norse$classification
## Kruskal-Wallis chi-squared = 13.029, df = 2, p-value = 0.001482
pairwise.wilcox.test(norse$Age, norse$classification, p.adj = "bonf", paired=F)
## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties
## 
##  Pairwise comparisons using Wilcoxon rank sum test 
## 
## data:  norse$Age and norse$classification 
## 
##    F      NF    
## NF 0.0344 -     
## PF 0.0047 1.0000
## 
## P value adjustment method: bonferroni
pairwise.wilcox.test(norse$SEdur, norse$classification, p.adj = "bonf", paired=F)
## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties
## 
##  Pairwise comparisons using Wilcoxon rank sum test 
## 
## data:  norse$SEdur and norse$classification 
## 
##    F     NF   
## NF 1.000 -    
## PF 0.015 0.268
## 
## P value adjustment method: bonferroni
pairwise.wilcox.test(norse$ICUdur, norse$classification, p.adj = "bonf", paired=F)
## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties
## 
##  Pairwise comparisons using Wilcoxon rank sum test 
## 
## data:  norse$ICUdur and norse$classification 
## 
##    F       NF   
## NF 1.000   -    
## PF 6.8e-06 0.005
## 
## P value adjustment method: bonferroni
pairwise.wilcox.test(norse$Nb.cont, norse$classification, p.adj = "bonf", paired=F)
## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties
## 
##  Pairwise comparisons using Wilcoxon rank sum test 
## 
## data:  norse$Nb.cont and norse$classification 
## 
##    F      NF    
## NF 1.0000 -     
## PF 0.0026 0.1016
## 
## P value adjustment method: bonferroni
pairwise.wilcox.test(norse$Nb.AED, norse$classification, p.adj = "bonf", paired=F)
## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties

## Warning in wilcox.test.default(xi, xj, paired = paired, ...): cannot compute
## exact p-value with ties
## 
##  Pairwise comparisons using Wilcoxon rank sum test 
## 
## data:  norse$Nb.AED and norse$classification 
## 
##    F      NF    
## NF 1.0000 -     
## PF 0.0053 0.3134
## 
## P value adjustment method: bonferroni
# Comparison of outcome and MRI findings
CrossTable(norse$Outcome, norse$MRI)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  31 
## 
##  
##               | norse$MRI 
## norse$Outcome |         0 |         1 | Row Total | 
## --------------|-----------|-----------|-----------|
##             0 |        11 |         4 |        15 | 
##               |     1.371 |     1.463 |           | 
##               |     0.733 |     0.267 |     0.484 | 
##               |     0.688 |     0.267 |           | 
##               |     0.355 |     0.129 |           | 
## --------------|-----------|-----------|-----------|
##             1 |         5 |        11 |        16 | 
##               |     1.285 |     1.371 |           | 
##               |     0.312 |     0.688 |     0.516 | 
##               |     0.312 |     0.733 |           | 
##               |     0.161 |     0.355 |           | 
## --------------|-----------|-----------|-----------|
##  Column Total |        16 |        15 |        31 | 
##               |     0.516 |     0.484 |           | 
## --------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$Outcome, norse$MRI)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$Outcome and norse$MRI
## p-value = 0.03195
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   1.027761 38.629542
## sample estimates:
## odds ratio 
##    5.66321

Subanalysis by age

#Create 2 groups by age (> or < 6 years)
norse$age_less6[norse$Age <= 6] <- 1
norse$age_less6[norse$Age > 6] <- 0
class(norse$age_less6)
## [1] "numeric"
norse$age_less6 <- as.character(as.numeric(norse$age_less6))
norse$age_less6 <- as.factor(as.character(norse$age_less6))
class(norse$age_less6)
## [1] "factor"

#Univariate analysis (comparison of the two age groups)

#Cualitative variables
CrossTable(norse$age_less6, norse$classification)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$classification 
## norse$age_less6 |         F |        NF |        PF | Row Total | 
## ----------------|-----------|-----------|-----------|-----------|
##               0 |         1 |         3 |         7 |        11 | 
##                 |     3.416 |     1.920 |     1.536 |           | 
##                 |     0.091 |     0.273 |     0.636 |     0.275 | 
##                 |     0.053 |     0.600 |     0.438 |           | 
##                 |     0.025 |     0.075 |     0.175 |           | 
## ----------------|-----------|-----------|-----------|-----------|
##               1 |        18 |         2 |         9 |        29 | 
##                 |     1.296 |     0.728 |     0.583 |           | 
##                 |     0.621 |     0.069 |     0.310 |     0.725 | 
##                 |     0.947 |     0.400 |     0.562 |           | 
##                 |     0.450 |     0.050 |     0.225 |           | 
## ----------------|-----------|-----------|-----------|-----------|
##    Column Total |        19 |         5 |        16 |        40 | 
##                 |     0.475 |     0.125 |     0.400 |           | 
## ----------------|-----------|-----------|-----------|-----------|
## 
## 
fisher.multcomp(table(norse$age_less6, norse$classification),p.method=c("bonferroni"))
## 
##         Pairwise comparisons using Fisher's exact test for count data
## 
## data:  table(norse$age_less6,norse$classification)
## 
##        F:NF    F:PF NF:PF
## 0:1 0.05505 0.03898     1
## 
## P value adjustment method: bonferroni
norse$Feveronset24[norse$classification == "F"] <- 1
norse$Feveronset24[norse$classification == "PF" | norse$classification == "NF"] <- 0
CrossTable(norse$age_less6, norse$Feveronset24)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$Feveronset24 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |        10 |         1 |        11 | 
##                 |     3.091 |     3.416 |           | 
##                 |     0.909 |     0.091 |     0.275 | 
##                 |     0.476 |     0.053 |           | 
##                 |     0.250 |     0.025 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        11 |        18 |        29 | 
##                 |     1.172 |     1.296 |           | 
##                 |     0.379 |     0.621 |     0.725 | 
##                 |     0.524 |     0.947 |           | 
##                 |     0.275 |     0.450 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        21 |        19 |        40 | 
##                 |     0.525 |     0.475 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$Feveronset24)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$Feveronset24
## p-value = 0.003923
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##    1.760096 745.241485
## sample estimates:
## odds ratio 
##   15.30593
CrossTable(norse$age_less6, norse$Sex)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$Sex 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         5 |         6 |        11 | 
##                 |     0.104 |     0.115 |           | 
##                 |     0.455 |     0.545 |     0.275 | 
##                 |     0.238 |     0.316 |           | 
##                 |     0.125 |     0.150 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        16 |        13 |        29 | 
##                 |     0.039 |     0.044 |           | 
##                 |     0.552 |     0.448 |     0.725 | 
##                 |     0.762 |     0.684 |           | 
##                 |     0.400 |     0.325 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        21 |        19 |        40 | 
##                 |     0.525 |     0.475 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$Sex)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$Sex
## p-value = 0.7271
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.1314107 3.3975583
## sample estimates:
## odds ratio 
##  0.6837744
CrossTable(norse$age_less6, norse$Prodromes)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$Prodromes 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         4 |         7 |        11 | 
##                 |     0.097 |     0.072 |           | 
##                 |     0.364 |     0.636 |     0.275 | 
##                 |     0.235 |     0.304 |           | 
##                 |     0.100 |     0.175 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        13 |        16 |        29 | 
##                 |     0.037 |     0.027 |           | 
##                 |     0.448 |     0.552 |     0.725 | 
##                 |     0.765 |     0.696 |           | 
##                 |     0.325 |     0.400 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        17 |        23 |        40 | 
##                 |     0.425 |     0.575 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$Prodromes)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$Prodromes
## p-value = 0.7298
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.123637 3.562499
## sample estimates:
## odds ratio 
##  0.7094504
CrossTable(norse$age_less6, norse$Fever.onset)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$Fever.onset 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         6 |         5 |        11 | 
##                 |     5.020 |     1.458 |           | 
##                 |     0.545 |     0.455 |     0.275 | 
##                 |     0.667 |     0.161 |           | 
##                 |     0.150 |     0.125 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |         3 |        26 |        29 | 
##                 |     1.904 |     0.553 |           | 
##                 |     0.103 |     0.897 |     0.725 | 
##                 |     0.333 |     0.839 |           | 
##                 |     0.075 |     0.650 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |         9 |        31 |        40 | 
##                 |     0.225 |     0.775 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$Fever.onset)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$Fever.onset
## p-value = 0.006681
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   1.486298 80.933854
## sample estimates:
## odds ratio 
##   9.584265
CrossTable(norse$age_less6, norse$Prior.fever)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$Prior.fever 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         4 |         7 |        11 | 
##                 |     1.024 |     1.536 |           | 
##                 |     0.364 |     0.636 |     0.275 | 
##                 |     0.167 |     0.438 |           | 
##                 |     0.100 |     0.175 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        20 |         9 |        29 | 
##                 |     0.389 |     0.583 |           | 
##                 |     0.690 |     0.310 |     0.725 | 
##                 |     0.833 |     0.562 |           | 
##                 |     0.500 |     0.225 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        24 |        16 |        40 | 
##                 |     0.600 |     0.400 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$Prior.fever)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$Prior.fever
## p-value = 0.07996
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.04477997 1.36459611
## sample estimates:
## odds ratio 
##  0.2668994
table(norse$age_less6, norse$No.fever)
##    
##      0  1
##   0  8  3
##   1 27  2
CrossTable(norse$age_less6, norse$No.fever)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$No.fever 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         8 |         3 |        11 | 
##                 |     0.274 |     1.920 |           | 
##                 |     0.727 |     0.273 |     0.275 | 
##                 |     0.229 |     0.600 |           | 
##                 |     0.200 |     0.075 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        27 |         2 |        29 | 
##                 |     0.104 |     0.728 |           | 
##                 |     0.931 |     0.069 |     0.725 | 
##                 |     0.771 |     0.400 |           | 
##                 |     0.675 |     0.050 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        35 |         5 |        40 | 
##                 |     0.875 |     0.125 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$No.fever)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$No.fever
## p-value = 0.1171
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.01485633 2.14018928
## sample estimates:
## odds ratio 
##  0.2077226
CrossTable(norse$age_less6, norse$EEG)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  36 
## 
##  
##                 | norse$EEG 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         8 |         3 |        11 | 
##                 |     1.980 |     1.584 |           | 
##                 |     0.727 |     0.273 |     0.306 | 
##                 |     0.500 |     0.150 |           | 
##                 |     0.222 |     0.083 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |         8 |        17 |        25 | 
##                 |     0.871 |     0.697 |           | 
##                 |     0.320 |     0.680 |     0.694 | 
##                 |     0.500 |     0.850 |           | 
##                 |     0.222 |     0.472 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        16 |        20 |        36 | 
##                 |     0.444 |     0.556 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$EEG)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$EEG
## p-value = 0.03351
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   0.9629193 40.1782859
## sample estimates:
## odds ratio 
##   5.372581
CrossTable(norse[which(norse$EEG==0),]$age_less6, norse[which(norse$EEG==0),]$EEG.Sz)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  16 
## 
##  
##                                          | norse[which(norse$EEG == 0), ]$EEG.Sz 
## norse[which(norse$EEG == 0), ]$age_less6 |         0 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        0 |         4 |         4 |         8 | 
##                                          |     0.333 |     0.200 |           | 
##                                          |     0.500 |     0.500 |     0.500 | 
##                                          |     0.667 |     0.400 |           | 
##                                          |     0.250 |     0.250 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        1 |         2 |         6 |         8 | 
##                                          |     0.333 |     0.200 |           | 
##                                          |     0.250 |     0.750 |     0.500 | 
##                                          |     0.333 |     0.600 |           | 
##                                          |     0.125 |     0.375 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                             Column Total |         6 |        10 |        16 | 
##                                          |     0.375 |     0.625 |           | 
## -----------------------------------------|-----------|-----------|-----------|
## 
## 
CrossTable(norse[which(norse$EEG==0),]$age_less6, norse[which(norse$EEG==0),]$EEG.intericatl.period)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  16 
## 
##  
##                                          | norse[which(norse$EEG == 0), ]$EEG.intericatl.period 
## norse[which(norse$EEG == 0), ]$age_less6 |         0 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        0 |         3 |         5 |         8 | 
##                                          |     0.100 |     0.045 |           | 
##                                          |     0.375 |     0.625 |     0.500 | 
##                                          |     0.600 |     0.455 |           | 
##                                          |     0.188 |     0.312 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        1 |         2 |         6 |         8 | 
##                                          |     0.100 |     0.045 |           | 
##                                          |     0.250 |     0.750 |     0.500 | 
##                                          |     0.400 |     0.545 |           | 
##                                          |     0.125 |     0.375 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                             Column Total |         5 |        11 |        16 | 
##                                          |     0.312 |     0.688 |           | 
## -----------------------------------------|-----------|-----------|-----------|
## 
## 
CrossTable(norse[which(norse$EEG==0),]$age_less6, norse[which(norse$EEG==0),]$sporadic.discharges)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14 
## 
##  
##                                          | norse[which(norse$EEG == 0), ]$sporadic.discharges 
## norse[which(norse$EEG == 0), ]$age_less6 |         0 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        0 |         2 |         6 |         8 | 
##                                          |     0.257 |     0.143 |           | 
##                                          |     0.250 |     0.750 |     0.571 | 
##                                          |     0.400 |     0.667 |           | 
##                                          |     0.143 |     0.429 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        1 |         3 |         3 |         6 | 
##                                          |     0.343 |     0.190 |           | 
##                                          |     0.500 |     0.500 |     0.429 | 
##                                          |     0.600 |     0.333 |           | 
##                                          |     0.214 |     0.214 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                             Column Total |         5 |         9 |        14 | 
##                                          |     0.357 |     0.643 |           | 
## -----------------------------------------|-----------|-----------|-----------|
## 
## 
CrossTable(norse$age_less6, norse$MRI)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  31 
## 
##  
##                 | norse$MRI 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         8 |         2 |        10 | 
##                 |     1.561 |     1.665 |           | 
##                 |     0.800 |     0.200 |     0.323 | 
##                 |     0.500 |     0.133 |           | 
##                 |     0.258 |     0.065 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |         8 |        13 |        21 | 
##                 |     0.743 |     0.793 |           | 
##                 |     0.381 |     0.619 |     0.677 | 
##                 |     0.500 |     0.867 |           | 
##                 |     0.258 |     0.419 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        16 |        15 |        31 | 
##                 |     0.516 |     0.484 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$MRI)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$MRI
## p-value = 0.0538
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   0.8995616 73.4269797
## sample estimates:
## odds ratio 
##   6.100051
CrossTable(norse[which(norse$MRI==0),]$age_less6, norse[which(norse$MRI==0),]$FLAIR)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  14 
## 
##  
##                                          | norse[which(norse$MRI == 0), ]$FLAIR 
## norse[which(norse$MRI == 0), ]$age_less6 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|
##                                        0 |         6 |         6 | 
##                                          |     0.429 |           | 
## -----------------------------------------|-----------|-----------|
##                                        1 |         8 |         8 | 
##                                          |     0.571 |           | 
## -----------------------------------------|-----------|-----------|
##                             Column Total |        14 |        14 | 
## -----------------------------------------|-----------|-----------|
## 
## 
CrossTable(norse[which(norse$MRI==0),]$age_less6, norse[which(norse$MRI==0),]$DWI)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  9 
## 
##  
##                                          | norse[which(norse$MRI == 0), ]$DWI 
## norse[which(norse$MRI == 0), ]$age_less6 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|
##                                        0 |         4 |         4 | 
##                                          |     0.444 |           | 
## -----------------------------------------|-----------|-----------|
##                                        1 |         5 |         5 | 
##                                          |     0.556 |           | 
## -----------------------------------------|-----------|-----------|
##                             Column Total |         9 |         9 | 
## -----------------------------------------|-----------|-----------|
## 
## 
CrossTable(norse$age_less6, norse$CSF)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  35 
## 
##  
##                 | norse$CSF 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         6 |         5 |        11 | 
##                 |     1.317 |     0.687 |           | 
##                 |     0.545 |     0.455 |     0.314 | 
##                 |     0.500 |     0.217 |           | 
##                 |     0.171 |     0.143 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |         6 |        18 |        24 | 
##                 |     0.604 |     0.315 |           | 
##                 |     0.250 |     0.750 |     0.686 | 
##                 |     0.500 |     0.783 |           | 
##                 |     0.171 |     0.514 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        12 |        23 |        35 | 
##                 |     0.343 |     0.657 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$CSF)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$CSF
## p-value = 0.1297
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   0.6254279 20.8881847
## sample estimates:
## odds ratio 
##   3.455321
CrossTable(norse[which(norse$CSF==0),]$age_less6, norse[which(norse$CSF==0),]$CSF.WC)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  12 
## 
##  
##                                          | norse[which(norse$CSF == 0), ]$CSF.WC 
## norse[which(norse$CSF == 0), ]$age_less6 |         0 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        0 |         3 |         3 |         6 | 
##                                          |     0.500 |     1.500 |           | 
##                                          |     0.500 |     0.500 |     0.500 | 
##                                          |     0.333 |     1.000 |           | 
##                                          |     0.250 |     0.250 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        1 |         6 |         0 |         6 | 
##                                          |     0.500 |     1.500 |           | 
##                                          |     1.000 |     0.000 |     0.500 | 
##                                          |     0.667 |     0.000 |           | 
##                                          |     0.500 |     0.000 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                             Column Total |         9 |         3 |        12 | 
##                                          |     0.750 |     0.250 |           | 
## -----------------------------------------|-----------|-----------|-----------|
## 
## 
CrossTable(norse[which(norse$CSF==0),]$age_less6, norse[which(norse$CSF==0),]$CSF.prot)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  12 
## 
##  
##                                          | norse[which(norse$CSF == 0), ]$CSF.prot 
## norse[which(norse$CSF == 0), ]$age_less6 |         0 |         1 | Row Total | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        0 |         6 |         0 |         6 | 
##                                          |     0.500 |     1.500 |           | 
##                                          |     1.000 |     0.000 |     0.500 | 
##                                          |     0.667 |     0.000 |           | 
##                                          |     0.500 |     0.000 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                                        1 |         3 |         3 |         6 | 
##                                          |     0.500 |     1.500 |           | 
##                                          |     0.500 |     0.500 |     0.500 | 
##                                          |     0.333 |     1.000 |           | 
##                                          |     0.250 |     0.250 |           | 
## -----------------------------------------|-----------|-----------|-----------|
##                             Column Total |         9 |         3 |        12 | 
##                                          |     0.750 |     0.250 |           | 
## -----------------------------------------|-----------|-----------|-----------|
## 
## 
CrossTable(norse$age_less6, norse$KD)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$KD 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         7 |         4 |        11 | 
##                 |     0.273 |     0.940 |           | 
##                 |     0.636 |     0.364 |     0.275 | 
##                 |     0.226 |     0.444 |           | 
##                 |     0.175 |     0.100 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        24 |         5 |        29 | 
##                 |     0.103 |     0.356 |           | 
##                 |     0.828 |     0.172 |     0.725 | 
##                 |     0.774 |     0.556 |           | 
##                 |     0.600 |     0.125 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        31 |         9 |        40 | 
##                 |     0.775 |     0.225 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$KD)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$KD
## p-value = 0.2268
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.05985895 2.42596346
## sample estimates:
## odds ratio 
##  0.3752061
CrossTable(norse$age_less6, norse$ImTh)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$ImTh 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         5 |         6 |        11 | 
##                 |     0.947 |     2.209 |           | 
##                 |     0.455 |     0.545 |     0.275 | 
##                 |     0.179 |     0.500 |           | 
##                 |     0.125 |     0.150 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        23 |         6 |        29 | 
##                 |     0.359 |     0.838 |           | 
##                 |     0.793 |     0.207 |     0.725 | 
##                 |     0.821 |     0.500 |           | 
##                 |     0.575 |     0.150 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        28 |        12 |        40 | 
##                 |     0.700 |     0.300 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$ImTh)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$ImTh
## p-value = 0.05632
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.03827155 1.23112409
## sample estimates:
## odds ratio 
##  0.2274606
CrossTable(norse[which(norse$ImTh==1),]$age_less6, norse[which(norse$ImTh==1),]$IVIG)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  9 
## 
##  
##                                           | norse[which(norse$ImTh == 1), ]$IVIG 
## norse[which(norse$ImTh == 1), ]$age_less6 |         1 | Row Total | 
## ------------------------------------------|-----------|-----------|
##                                         0 |         4 |         4 | 
##                                           |     0.444 |           | 
## ------------------------------------------|-----------|-----------|
##                                         1 |         5 |         5 | 
##                                           |     0.556 |           | 
## ------------------------------------------|-----------|-----------|
##                              Column Total |         9 |         9 | 
## ------------------------------------------|-----------|-----------|
## 
## 
CrossTable(norse[which(norse$ImTh==1),]$age_less6, norse[which(norse$ImTh==1),]$STEROIDS)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  11 
## 
##  
##                                           | norse[which(norse$ImTh == 1), ]$STEROIDS 
## norse[which(norse$ImTh == 1), ]$age_less6 |         1 | Row Total | 
## ------------------------------------------|-----------|-----------|
##                                         0 |         6 |         6 | 
##                                           |     0.545 |           | 
## ------------------------------------------|-----------|-----------|
##                                         1 |         5 |         5 | 
##                                           |     0.455 |           | 
## ------------------------------------------|-----------|-----------|
##                              Column Total |        11 |        11 | 
## ------------------------------------------|-----------|-----------|
## 
## 
CrossTable(norse[which(norse$ImTh==1),]$age_less6, norse[which(norse$ImTh==1),]$Plasmaph)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  3 
## 
##  
##                                           | norse[which(norse$ImTh == 1), ]$Plasmaph 
## norse[which(norse$ImTh == 1), ]$age_less6 |         1 | Row Total | 
## ------------------------------------------|-----------|-----------|
##                                         0 |         1 |         1 | 
##                                           |     0.333 |           | 
## ------------------------------------------|-----------|-----------|
##                                         1 |         2 |         2 | 
##                                           |     0.667 |           | 
## ------------------------------------------|-----------|-----------|
##                              Column Total |         3 |         3 | 
## ------------------------------------------|-----------|-----------|
## 
## 
CrossTable(norse$age_less6, norse$Outcome)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$Outcome 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         8 |         3 |        11 | 
##                 |     3.640 |     2.184 |           | 
##                 |     0.727 |     0.273 |     0.275 | 
##                 |     0.533 |     0.120 |           | 
##                 |     0.200 |     0.075 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |         7 |        22 |        29 | 
##                 |     1.381 |     0.828 |           | 
##                 |     0.241 |     0.759 |     0.725 | 
##                 |     0.467 |     0.880 |           | 
##                 |     0.175 |     0.550 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        15 |        25 |        40 | 
##                 |     0.375 |     0.625 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$Outcome)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$Outcome
## p-value = 0.009013
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   1.411104 59.170969
## sample estimates:
## odds ratio 
##   7.855526
CrossTable(norse$Outcome, norse$age_less6)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##               | norse$age_less6 
## norse$Outcome |         0 |         1 | Row Total | 
## --------------|-----------|-----------|-----------|
##             0 |         8 |         7 |        15 | 
##               |     3.640 |     1.381 |           | 
##               |     0.533 |     0.467 |     0.375 | 
##               |     0.727 |     0.241 |           | 
##               |     0.200 |     0.175 |           | 
## --------------|-----------|-----------|-----------|
##             1 |         3 |        22 |        25 | 
##               |     2.184 |     0.828 |           | 
##               |     0.120 |     0.880 |     0.625 | 
##               |     0.273 |     0.759 |           | 
##               |     0.075 |     0.550 |           | 
## --------------|-----------|-----------|-----------|
##  Column Total |        11 |        29 |        40 | 
##               |     0.275 |     0.725 |           | 
## --------------|-----------|-----------|-----------|
## 
## 
CrossTable(norse$age_less6, norse$AE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  40 
## 
##  
##                 | norse$AE 
## norse$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         4 |         7 |        11 | 
##                 |     0.855 |     1.156 |           | 
##                 |     0.364 |     0.636 |     0.275 | 
##                 |     0.174 |     0.412 |           | 
##                 |     0.100 |     0.175 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |        19 |        10 |        29 | 
##                 |     0.324 |     0.439 |           | 
##                 |     0.655 |     0.345 |     0.725 | 
##                 |     0.826 |     0.588 |           | 
##                 |     0.475 |     0.250 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        23 |        17 |        40 | 
##                 |     0.575 |     0.425 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
fisher.test(norse$age_less6, norse$AE)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  norse$age_less6 and norse$AE
## p-value = 0.153
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.05282248 1.57151322
## sample estimates:
## odds ratio 
##   0.310545
fires <- subset(norse, norse$classification=="PF")
CrossTable(fires$age_less6, fires$Prodromes)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  16 
## 
##  
##                 | fires$Prodromes 
## fires$age_less6 |         1 | Row Total | 
## ----------------|-----------|-----------|
##               0 |         7 |         7 | 
##                 |     0.438 |           | 
## ----------------|-----------|-----------|
##               1 |         9 |         9 | 
##                 |     0.562 |           | 
## ----------------|-----------|-----------|
##    Column Total |        16 |        16 | 
## ----------------|-----------|-----------|
## 
## 
table(fires$age_less6, fires$Prodromes)
##    
##     1
##   0 7
##   1 9
CrossTable(fires$age_less6, fires$Outcome)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  16 
## 
##  
##                 | fires$Outcome 
## fires$age_less6 |         0 |         1 | Row Total | 
## ----------------|-----------|-----------|-----------|
##               0 |         7 |         0 |         7 | 
##                 |     0.583 |     1.750 |           | 
##                 |     1.000 |     0.000 |     0.438 | 
##                 |     0.583 |     0.000 |           | 
##                 |     0.438 |     0.000 |           | 
## ----------------|-----------|-----------|-----------|
##               1 |         5 |         4 |         9 | 
##                 |     0.454 |     1.361 |           | 
##                 |     0.556 |     0.444 |     0.562 | 
##                 |     0.417 |     1.000 |           | 
##                 |     0.312 |     0.250 |           | 
## ----------------|-----------|-----------|-----------|
##    Column Total |        12 |         4 |        16 | 
##                 |     0.750 |     0.250 |           | 
## ----------------|-----------|-----------|-----------|
## 
## 
#Cuantitative variables
nobs(norse$SEdur)
## [1] 32
summary(norse$SEdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    6.00   19.00  273.03   96.75 2784.00       8
summary(norse[which(norse$age_less6==1),]$SEdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    4.25    8.50  105.18   40.00 1032.00       6
summary(norse[which(norse$age_less6==0),]$SEdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##       9      24      52     702    1200    2784       2
wilcox.test(norse[which(norse$age_less6 == 0), ]$SEdur, norse[which(norse$ age_less6 == 1), ]$SEdur)
## Warning in wilcox.test.default(norse[which(norse$age_less6 == 0), ]$SEdur, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  norse[which(norse$age_less6 == 0), ]$SEdur and norse[which(norse$age_less6 == 1), ]$SEdur
## W = 166.5, p-value = 0.00878
## alternative hypothesis: true location shift is not equal to 0
nobs(norse$ICUdur)
## [1] 39
summary(norse$ICUdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    1.50    3.00   19.85   33.00  100.00       1
summary(norse[which(norse$age_less6==1),]$ICUdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   3.000  12.739   6.275 100.000       1
summary(norse[which(norse$age_less6==0),]$ICUdur)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    1.50    3.50   42.00   37.95   62.00   93.00
wilcox.test(norse[which(norse$age_less6 == 0), ]$ICUdur, norse[which(norse$ age_less6 == 1), ]$ICUdur)
## Warning in wilcox.test.default(norse[which(norse$age_less6 == 0), ]$ICUdur, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  norse[which(norse$age_less6 == 0), ]$ICUdur and norse[which(norse$age_less6 == 1), ]$ICUdur
## W = 233, p-value = 0.01401
## alternative hypothesis: true location shift is not equal to 0
nobs(norse$Nb.cont)
## [1] 40
summary(norse$Nb.cont)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.000   1.025   1.000   4.000
summary(norse[which(norse$age_less6==1),]$Nb.cont)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.0000  0.0000  0.8276  1.0000  4.0000
summary(norse[which(norse$age_less6==0),]$Nb.cont)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.000   1.000   1.545   2.500   4.000
wilcox.test(norse[which(norse$age_less6 == 0), ]$Nb.cont, norse[which(norse$ age_less6 == 1), ]$Nb.cont)
## Warning in wilcox.test.default(norse[which(norse$age_less6 == 0), ]$Nb.cont, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  norse[which(norse$age_less6 == 0), ]$Nb.cont and norse[which(norse$age_less6 == 1), ]$Nb.cont
## W = 218.5, p-value = 0.05885
## alternative hypothesis: true location shift is not equal to 0
nobs(norse$Nb.AED)
## [1] 40
summary(norse$Nb.AED)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   1.750   2.000   2.225   2.250   8.000
summary(norse[which(norse$age_less6==1),]$Nb.AED)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   2.000   2.000   2.207   2.000   8.000
summary(norse[which(norse$age_less6==0),]$Nb.AED)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   1.500   2.000   2.273   3.000   5.000
wilcox.test(norse[which(norse$age_less6 == 0), ]$Nb.AED, norse[which(norse$ age_less6 == 1), ]$Nb.AED)
## Warning in wilcox.test.default(norse[which(norse$age_less6 == 0), ]$Nb.AED, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  norse[which(norse$age_less6 == 0), ]$Nb.AED and norse[which(norse$age_less6 == 1), ]$Nb.AED
## W = 172, p-value = 0.6945
## alternative hypothesis: true location shift is not equal to 0