Ejercicio No1
## Loading required package: survival
## Package epiR 2.0.19 is loaded
## Type help(epi.about) for summary information
## Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses
##
a=72
b=100
c=18
d=150
matrix(c(a,b,c,d), nrow=2, byrow=TRUE)
## [,1] [,2]
## [1,] 72 100
## [2,] 18 150
tabla=as.table(matrix(c(a,b,c,d), nrow=2, byrow=TRUE))
colnames(tabla)=c("Enfermo", "Sano")
rownames(tabla)=c("Positivo", "Negativo")
tabla
## Enfermo Sano
## Positivo 72 100
## Negativo 18 150
Probabilidades=epi.tests(tabla, conf.level=0.95)
Probabilidades
## Outcome + Outcome - Total
## Test + 72 100 172
## Test - 18 150 168
## Total 90 250 340
##
## Point estimates and 95 % CIs:
## ---------------------------------------------------------
## Apparent prevalence 0.51 (0.45, 0.56)
## True prevalence 0.26 (0.22, 0.31)
## Sensitivity 0.80 (0.70, 0.88)
## Specificity 0.60 (0.54, 0.66)
## Positive predictive value 0.42 (0.34, 0.50)
## Negative predictive value 0.89 (0.84, 0.94)
## Positive likelihood ratio 2.00 (1.66, 2.40)
## Negative likelihood ratio 0.33 (0.22, 0.51)
## ---------------------------------------------------------
a=120
b=140
c=480
d=260
matrix(c(a,b,c,d), nrow=2, byrow=TRUE)
## [,1] [,2]
## [1,] 120 140
## [2,] 480 260
tabla1=as.table(matrix(c(a,b,c,d), nrow=2, byrow=TRUE))
colnames(tabla1)=c("niña", "niño")
rownames(tabla1)=c("menor24", "mayor24")
tabla1
## niña niño
## menor24 120 140
## mayor24 480 260
Probabilidades1=epi.tests(tabla1, conf.level=0.95)
Probabilidades1
## Outcome + Outcome - Total
## Test + 120 140 260
## Test - 480 260 740
## Total 600 400 1000
##
## Point estimates and 95 % CIs:
## ---------------------------------------------------------
## Apparent prevalence 0.26 (0.23, 0.29)
## True prevalence 0.60 (0.57, 0.63)
## Sensitivity 0.20 (0.17, 0.23)
## Specificity 0.65 (0.60, 0.70)
## Positive predictive value 0.46 (0.40, 0.52)
## Negative predictive value 0.35 (0.32, 0.39)
## Positive likelihood ratio 0.57 (0.46, 0.70)
## Negative likelihood ratio 1.23 (1.13, 1.34)
## ---------------------------------------------------------