Title: | Vaccines Pharmacometrics |
---|---|
Description: | Estimate vaccine efficacy (VE) using immunogenicity data. The inclusion of immunogenicity data in regression models can increase precision in VE. The methods are described in the publications "Elucidating vaccine efficacy using a correlate of protection, demographics, and logistic regression" and "Improving precision of vaccine efficacy evaluation using immune correlate data in time-to-event models" by Julie Dudasova, Zdenek Valenta, and Jeffrey R. Sachs (2024). |
Authors: | Julie Dudasova (MSD) [aut, cre] |
Maintainer: | Julie Dudasova (MSD) <[email protected]> |
License: | GPL-3 |
Version: | 0.0.6 |
Built: | 2024-11-25 16:48:52 UTC |
Source: | CRAN |
"coxph"
model and observed datacoxphParametricSampling
is used for vaccine efficacy confidence interval construction.
It provides a vector of vaccine efficacy values, with length of nboot
. 95% confidence interval, defined by 2.5th and 97.5th quantile of this vector,
accounts for the uncertainty on the model fit (via parametric resampling of the posterior distribution of the model parameters) and observed data (via bootstrapping).
coxphParametricSampling(Fit, nboot = 2000, Data.vaccinated, Data.control)
coxphParametricSampling(Fit, nboot = 2000, Data.vaccinated, Data.control)
Fit |
an object of class inheriting from |
nboot |
a numeric value for number of bootstrap samples for confidence interval construction |
Data.vaccinated |
a data frame for the vaccinated group, containing the variables in the fitted model |
Data.control |
a data frame for the control group, containing the variables in the fitted model |
a vector of vaccine efficacy values VE_set
, with length of nboot
# Load required packages library(dplyr) library(survival) # Load an example dataset data(data_temp) Data.vaccinated <- filter(data_temp, vaccine == 1) Data.control <- filter(data_temp, vaccine == 0) # Fit Cox proportional hazards model relating neutralizing titer # to time to disease or end of follow-up coxFit <- coxph(Surv(time_event, disease_any) ~ nAb1, data = data_temp) # Estimate 95\% confidence interval of vaccine efficacy based on the fitted model efficacySet <- coxphParametricSampling(coxFit, nboot = 500, Data.vaccinated, Data.control) CI <- lapply(EfficacyCI(efficacySet),"*", 100)
# Load required packages library(dplyr) library(survival) # Load an example dataset data(data_temp) Data.vaccinated <- filter(data_temp, vaccine == 1) Data.control <- filter(data_temp, vaccine == 0) # Fit Cox proportional hazards model relating neutralizing titer # to time to disease or end of follow-up coxFit <- coxph(Surv(time_event, disease_any) ~ nAb1, data = data_temp) # Estimate 95\% confidence interval of vaccine efficacy based on the fitted model efficacySet <- coxphParametricSampling(coxFit, nboot = 500, Data.vaccinated, Data.control) CI <- lapply(EfficacyCI(efficacySet),"*", 100)
A dataset containing immunogenicity data, and clinical outcome data in the vaccinated and control groups. The dataset is provided in the form of a data frame.
data_temp
data_temp
Data frame:
identification of subjects
value of neutralizing titer for serotype 1
value of neutralizing titer for serotype 2
binary indicator of a baseline demographic characteristics of interest
binary indicator of treatment arm, with value 1 in vaccinated and 0 in control subjects
serotype of disease
binary indicator of disease caused by any serotype
time to disease or end of follow-up in days
Function summarizes efficacy statistics (mean, median, confidence intervals) based on the set of estimated efficacy values and chosen condfidence interval.
EfficacyCI(efficacySet, ci = 0.95)
EfficacyCI(efficacySet, ci = 0.95)
efficacySet |
numeric vector - vector of estimated efficacy values |
ci |
numeric - required confidence level |
Confidence intervals are calculated using quantiles of estimated efficacy values.
named list - mean, median, CILow, CIHigh
# Load required packages library(dplyr) # Load an example dataset data(data_temp) Data.vaccinated <- filter(data_temp, vaccine == 1) Data.control <- filter(data_temp, vaccine == 0) # Fit logistic model relating neutralizing titer to disease status logisticFit <- glm(disease_any ~ nAb1, data = data_temp, family = binomial()) # Estimate 95\% confidence interval of vaccine efficacy based on the fitted model efficacySet <- glmParametricSampling(logisticFit, nboot = 500, Data.vaccinated, Data.control) EfficacyCI(efficacySet)
# Load required packages library(dplyr) # Load an example dataset data(data_temp) Data.vaccinated <- filter(data_temp, vaccine == 1) Data.control <- filter(data_temp, vaccine == 0) # Fit logistic model relating neutralizing titer to disease status logisticFit <- glm(disease_any ~ nAb1, data = data_temp, family = binomial()) # Estimate 95\% confidence interval of vaccine efficacy based on the fitted model efficacySet <- glmParametricSampling(logisticFit, nboot = 500, Data.vaccinated, Data.control) EfficacyCI(efficacySet)
"glm"
model and observed dataglmParametricSampling
is used for vaccine efficacy confidence interval construction.
It provides a vector of vaccine efficacy values, with length of nboot
. 95% confidence interval, defined by 2.5th and 97.5th percentile of this vector,
accounts for the uncertainty on the model fit (via parametric resampling of the posterior distribution of the model parameters) and observed data (via bootstrapping).
glmParametricSampling(Fit, nboot = 2000, Data.vaccinated, Data.control)
glmParametricSampling(Fit, nboot = 2000, Data.vaccinated, Data.control)
Fit |
an object of class inheriting from |
nboot |
a numeric value for number of bootstrap samples for confidence interval construction |
Data.vaccinated |
a data frame for the vaccinated group, containing the variables in the fitted model; data must include a column called "vaccine" with binary indicator of vaccination status |
Data.control |
a data frame for the control group, containing the variables in the fitted model; data must include a column called "vaccine" with binary indicator of vaccination status |
a vector of vaccine efficacy values VE_set
, with length of nboot
# Load required packages library(dplyr) # Load an example dataset data(data_temp) Data.vaccinated <- filter(data_temp, vaccine == 1) Data.control <- filter(data_temp, vaccine == 0) # Fit logistic model relating neutralizing titer to disease status logisticFit <- glm(disease_any ~ nAb1, data = data_temp, family = binomial()) # Estimate 95\% confidence interval of vaccine efficacy based on the fitted model efficacySet <- glmParametricSampling(logisticFit, nboot = 500, Data.vaccinated, Data.control) CI <- lapply(EfficacyCI(efficacySet),"*", 100)
# Load required packages library(dplyr) # Load an example dataset data(data_temp) Data.vaccinated <- filter(data_temp, vaccine == 1) Data.control <- filter(data_temp, vaccine == 0) # Fit logistic model relating neutralizing titer to disease status logisticFit <- glm(disease_any ~ nAb1, data = data_temp, family = binomial()) # Estimate 95\% confidence interval of vaccine efficacy based on the fitted model efficacySet <- glmParametricSampling(logisticFit, nboot = 500, Data.vaccinated, Data.control) CI <- lapply(EfficacyCI(efficacySet),"*", 100)
Calculates vaccine efficacy and confidence interval as described in Dudasova et al., 2024, BMC Med Res Methodol and Dudasova et al., 2024, NPJ Vaccines
ve(Fit, Data, nboot = 2000)
ve(Fit, Data, nboot = 2000)
Fit |
an object of class inheriting from |
Data |
a data frame containing the variables in the fitted model; data must include a column called "vaccine" with binary indicator of vaccination status |
nboot |
a numeric value for number of bootstrap samples for confidence interval construction |
a value of vaccine efficacy VE
and lower and upper bound of confidence interval CI
#' # Load required packages library(survival) # Load an example dataset data(data_temp) # Fit logistic model relating neutralizing titer to disease status logisticFit <- glm(disease_any ~ nAb1, data = data_temp, family = binomial()) # Fit Cox proportional hazards model relating neutralizing titer # to time to disease or end of follow-up coxFit <- coxph(Surv(time_event, disease_any) ~ nAb1, data = data_temp) # Estimate vaccine efficacy and 95\% confidence interval based on the fitted models ve(logisticFit, data_temp, nboot = 500) ve(coxFit, data_temp, nboot = 500)
#' # Load required packages library(survival) # Load an example dataset data(data_temp) # Fit logistic model relating neutralizing titer to disease status logisticFit <- glm(disease_any ~ nAb1, data = data_temp, family = binomial()) # Fit Cox proportional hazards model relating neutralizing titer # to time to disease or end of follow-up coxFit <- coxph(Surv(time_event, disease_any) ~ nAb1, data = data_temp) # Estimate vaccine efficacy and 95\% confidence interval based on the fitted models ve(logisticFit, data_temp, nboot = 500) ve(coxFit, data_temp, nboot = 500)