# NOT RUN {
# Example 1
data(vaccinated)
data(control)
data(PoDParams)
# Defining the PoD curve
funPoD <- function(x) PoD(x, pmax = PoDParams$pmax, et50 = PoDParams$et50, slope = PoDParams$slope)
# Defining the titer distribution for vaccinated and control groups
funVaccinated <- function(x) dnorm(x, mean = vaccinated$mean, sd = vaccinated$stdDev)
funControl <- function(x) dnorm(x, mean = control$mean, sd = control$stdDev)
# Calculating the expected probability of disease
aucVaccinated <- ExpectedPoD(funPoD, funVaccinated)
aucControl <- ExpectedPoD(funPoD, funControl)
# PoDBAY efficacy estimation
efficacy <- 1 - aucVaccinated/aucControl
# }
Run the code above in your browser using DataLab