The omicron (B.1.1.529) variant of SARS-CoV-2 has increased capacity to elude immunity and cause breakthrough infections. The aim of this study was to estimate the effectiveness of mRNA-based vaccine boosters (third dose) against infection with the omicron variant by age, sex, time since complete vaccination, type of primary vaccine, and type of booster.
In this population cohort study, we linked data from three population registries in Navarra (Vaccination Registry, Laboratory Results Registry, and BARDENA-Population registry) to select
On each day between Jan 3, and Feb 6, 2022, we matched:
Etiqueta | Variable |
---|---|
Código paciente (pac_unif_cod) | id |
genero | gen |
Fecha nacimiento (exclusion) | fnac |
grupo de edad, quinquenal salvo (0,40],(90,110] | gedad |
fecha defuncion | fdef |
migrante (pais de nacimiento no España) | migran |
area (grupo de paises) de nacimiento | lapna |
codigo aportacion farmaceutica (tsi) | ctsi |
vive en residencia true | resn |
unidad de convivencia, truncado (8 ó mas) | ucn8 |
renta seccion censal categorizada -promedio 2011-2016- | rentasc |
codigo de zona basica -por centro de atencion- | czbs |
profesional sociosanitario true | prfss |
profesional educativo true | educa |
vulnerable | vuln |
dependiente true | depe |
demencia | deme |
diabetes | diab |
enf. autoinmune | ainm |
coronariopatia | corp |
insuficiencia renal cronica | irc |
enf pulmonar obstructiva cronica-EPOC | epoc |
hiperlipemia | hlip |
hipertension arterial (hta) | hta |
ictus | ictu |
obesidad (imc>30) | obes |
indice masa corporal (imc) | imc |
indice masa corporal, categorias | cimc |
recibe vacuna gripe campaña 2020 | vgp20 |
recibe vacuna gripe campaña 2021 | vgp21 |
tipo vacuna covid 1 | tvc1 |
vacunacion incompleta true | vcix |
fecha vacuna covid 1 | fvc1 |
tipo vacuna covid 2 | tvc2 |
fecha vacuna covid 2 | fvc2 |
tipo vacuna covid 3 | tvc3 |
fecha vacuna covid 3 | fvc3 |
infeccion covid si/no (ref junio 2022) | cvsn |
fecha infeccion covid 1 | fcv1 |
fecha infeccion covid 2 | fcv2 |
fecha primer ingreso hospitalario | fih1 |
ingreso UCI si/no | ucisn |
fecha ingreso UCI | fuci |
<-function(fecha0="2022-01-14", file_Rdata_poblacion="Rdata/pobana.Rdata",file_Rdata_test="Rdata/test220613.Rdata") {
f_tabla0=ymd(fecha0)
fecha0print("Asegurate de que Knit Directory es Current working directory")
if (!"pobana"%in% ls(envir = .GlobalEnv)){
load(file_Rdata_poblacion,envir = .GlobalEnv)
}if (!"test220613"%in% ls(envir = .GlobalEnv)){
load(file_Rdata_test,envir = .GlobalEnv )
}get("pobana", envir = .GlobalEnv)->pobana
get("test220613", envir = .GlobalEnv)->test220613
print(paste("n de partida :",nrow(pobana)))
print("Excluyendo: socio y/o sanitarios...")
%>% filter(is.na(prfss) | prfss!=TRUE)->pobana
pobana print(paste("n :",nrow(pobana)))
print("Excluyendo: trabj educacion...")
%>% filter(is.na(educa) | educa!=TRUE)->pobana
pobana print(paste("n :",nrow(pobana)))
print("Excluyendo: viven en residencia...")
%>% filter(is.na(resn) | resn!=TRUE)->pobana
pobana print(paste("n :",nrow(pobana)))
print("Excluyendo:dependientes...")
%>% filter(is.na(depe) | depe!=TRUE)->pobana
pobana print(paste("n :",nrow(pobana)))
print("Excluyendo: zona basica desconocida...")
%>% filter(!is.na(czbs))->pobana
pobana print(paste("n :",nrow(pobana)))
print("Excluyendo: tuvo infección previa...")
%>% filter(cvsn==0|fcv1>=ymd(fecha0))->pobana
pobana print(paste("n :",nrow(pobana)))
print("Excluyendo: no finalizo vacunacion completa 90 dias antes...")
%>% filter(fecha0-fvc2>90)->tabla_0_pobana
pobana print(paste("n :",nrow(tabla_0_pobana)))
print("calculando tests negativos previos...")
%>% filter(id %in% tabla_0_pobana$id &tpos==FALSE) %>% group_by(id)%>% summarise(n_0=max(n)) %>% right_join(tabla_0_pobana, by="id") %>% mutate(n_0=ifelse(is.na(n_0),0,ifelse(n_0>3,3,n_0)), tv2=as.numeric(ymd(fecha0)-fvc2))->pobana_n_tabla0
test220613
<- pobana_n_tabla0 %>% mutate(
pobana_n_tabla0 genn=as.numeric(gen)-1,
gedadn=as.numeric(gedad),
czbs=as.numeric(czbs),
migran=as.numeric(migran),
vgp20=as.numeric(vgp20),
vgp21=as.numeric(vgp21),
tvc2n=as.numeric(as.factor(tvc2))) %>% dplyr::select(id,fvc2,fvc3,fdef,fcv1,fih1,genn,gedad,gedadn,czbs,n_0,tvc2n,tvc3,tv2,migran,vgp20,vgp21,ucn8)
return(pobana_n_tabla0)
}
# lo aplico empleando como inicio 2022-01-03": genera el flow_chart
f_tabla0(fecha0="2022-01-03")->tab0220103
## [1] "Asegurate de que Knit Directory es Current working directory"
## [1] "n de partida : 645209"
## [1] "Excluyendo: socio y/o sanitarios..."
## [1] "n : 622490"
## [1] "Excluyendo: trabj educacion..."
## [1] "n : 490730"
## [1] "Excluyendo: viven en residencia..."
## [1] "n : 481242"
## [1] "Excluyendo:dependientes..."
## [1] "n : 474254"
## [1] "Excluyendo: zona basica desconocida..."
## [1] "n : 460039"
## [1] "Excluyendo: tuvo infección previa..."
## [1] "n : 373412"
## [1] "Excluyendo: no finalizo vacunacion completa 90 dias antes..."
## [1] "n : 304370"
## [1] "calculando tests negativos previos..."
parametro: datos + fecha 0 de arranque -primera cohorte-
entrada: tabla filtrada por f_tabla0
salida: tabla de analisis * filtra y excluye aquellos con:
+ con fecha de 3 dosis anterior al t0/
+ fallecidos o /
+ infectados previamente/
= function(data, fecha0) {
f_exclusion= data %>% filter(is.na(fvc3) | fecha0 <= fvc3,
datais.na(fcv1) | fecha0 < fcv1,
is.na(fdef) | fecha0 < fdef)
return(data)
}
parametro: datos + fecha 0 de arranque -primera cohorte- + duración del seguimiento
entrada: tabla filtrada por f_tabla0 y f_exclusion
salida: tabla de analisis:
* genera variable `exposicion`/
* recoge fecha inicio de la cohorte/
* genera fecha fin seguimiento/censura del sujeto/
= function(data, fecha0, n=60) {
f_exposicionseguimiento= data %>% mutate(
dataexposicion = if_else(fecha0 == fvc3 & !is.na(fvc3), 1, 0),
date_start = fecha0,
date_end = fecha0 + n,
date_end = ifelse(!is.na(fdef) & fdef < date_end, fdef, date_end),
date_end = ifelse(exposicion == 0 & !is.na(fvc3) & fvc3 < date_end, fvc3, date_end),
date_end = as.Date.numeric(date_end, origin ="1970-01-01" )
)return(data)
}
Esta es la función que pretende ser más genérica
parametros:
fecha primera infección
)entrada: tabla filtrada por f_tabla0 y f_exclusion
salida: tabla de analisis:
+ genera variable `exposicion`/
+ recoge fecha inicio de la cohorte/
+ genera fecha fin seguimiento/censura del sujeto/
los motivos de censura de una pareja son: + fallece + el miembro no expuesto se vacuna
<- function(fecha0, data, vector_match, out="fcv1", f_exclusion, f_exposicionseguimiento) {
f_matching =ymd(fecha0)
fecha0print(fecha0)
print(c("out= ",out))
= data %>% f_exclusion(fecha0) %>% f_exposicionseguimiento(fecha0)
x
try({
<- Matching::Match(Tr = x$exposicion, M = 1, X = x[vector_match], exact = TRUE, ties = FALSE)
greedymatch <- x[unlist(greedymatch[c("index.treated", "index.control")]),]
a <- rep(1:(nrow(a)/2), 2)
par
=bind_cols(par = par, a) %>%
dfgroup_by(par) %>%
mutate(date_end = min(date_end),
# creo la variable de resultado)
caso = ifelse(!!as.name(out) <= date_end & !is.na(!!as.name(out)), 1, 0),
date_end = ifelse(caso==1, !!as.name(out), date_end),
date_end = as.Date.numeric(date_end, origin ="1970-01-01")) %>%
data.frame()
print(c("n= ",nrow(df)))
print(c("casos= ",df %>% filter(caso==1) %>% nrow()))
}
) }
Referido al dia 2022-01-14, y aplicando el vector de cruze:
al emparejar por:
+ tiempo desde la segunda vacuna(tv2)-> 11469,
+ genero->10542,
+ zbs-> 10542,
+ migrante->9804,
+ vacunas de grupe(vgp20 + vgp21)-> 8180,
+ tipo de segunda vacuna(tvc2)->8020,
+ numero de convivientes (truncado en 8): ucn8=4364
# se define el vector de emparejamiento
=c("czbs","genn" ,"gedadn", "n_0", "tvc2n", "tv2", "migran","vgp20","vgp21","ucn8")
vector_match
# fecha de inicio y fin: secuencia de fechas
=dmy("03/01/2022")
fecha_inicio=dmy("05/01/2022")
fecha_fin<- seq.Date(from = fecha_inicio, to = fecha_fin, by = "days")
fechas
# se genera una lista con las diversas cohortes diarias
<- lapply(fechas,
listaej
f_matching, data=tab0220103,
vector_match=vector_match,
out="fcv1",
f_exclusion=f_exclusion,
f_exposicionseg=f_exposicionseg)
## [1] "2022-01-03"
## [1] "out= " "fcv1"
## [1] "n= " "1072"
## [1] "casos= " "83"
## [1] "2022-01-04"
## [1] "out= " "fcv1"
## [1] "n= " "474"
## [1] "casos= " "28"
## [1] "2022-01-05"
## [1] "out= " "fcv1"
## [1] "n= " "702"
## [1] "casos= " "36"
<- function(lista) {
f_analisis <- bind_rows(lista[sapply(lista, class) == "data.frame"])
base_analisis print(table(base_analisis$caso))
<- base_analisis %>% mutate(survtime=date_end-date_start)
base_analisis <- survfit(Surv(survtime, caso) ~ exposicion, data=base_analisis)
fit print(ggsurvplot(fit, data = base_analisis, xlab="days of follow-up",
ylab="Survival probability",
main="Product-Limit Survival Estimates", ylim=c(0.85,1), risk.table = TRUE, conf.int = TRUE))
### cox
=coxph(formula = Surv(survtime, caso) ~ exposicion, data = base_analisis)
cppprint("# Estimated effectiveness was 43·6% (40·0–47·1) -toda España-")
print(paste0("# Estimated effectiveness in Navarra was :",round((1-exp(coef(cpp)))*100,1), "% (", round((1-exp(confint((cpp)))[2])*100,1),"-", round((1-exp(confint((cpp)))[1])*100,1),")"))
}
f_analisis(lista)
##
## 0 1
## 44922 2504
## [1] "# Estimated effectiveness was 43·6% (40·0–47·1) -toda España-"
## [1] "# Estimated effectiveness in Navarra was :43.5% (38.7-47.9)"