Description Usage Arguments Details Value Examples
View source: R/FunctionsPODBAYEfficacy.R
Function calculates the integral of multiplication of two functions: PoD curve and titer probability density function.
1 | ExpectedPoD(f.pod, f.titer)
|
f.pod |
function(x): PoD curve, estimated sigmoid function relating titers to a probability of disease |
f.titer |
function(x): titer probability density function, distribution of titer values in a group. |
Function calculates integral from -Inf to +Inf of titer probability density function multiplied by the PoD curve.
It is used mainly in the PoDBAY efficacy calculation efficacyComputation
.
Value of the integral of the multiplication of the two functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.