Description Usage Arguments Details Value Examples
View source: R/FunctionsPoDParameters.R
Function finds PoD curve parameters (et50, slope) using population summary statistics (mean, sd) and input (reference value, or for example true in the simulation setup) efficacy.
Efficacy is independent of pmax parameter thus pmax is estimated separately using PmaxEstimation
function.
1 2 3 4 5 6 7 | PoDEfficacySquaredError(TrueEfficacy,
vaccinated,
control,
initialSlope = 6,
adjustTiters = FALSE,
adjustFrom = NA,
adjustTo = NA)
|
TrueEfficacy |
numeric: input reference efficacy |
vaccinated |
|
control |
|
initialSlope |
numeric: initial slope parameter for the optimization function |
adjustTiters |
boolean: set to TRUE if titer values should be adjusted, for details see |
adjustFrom |
numeric: value specifying the detection limit, all values below the detection limit will be adjusted to adjustTo value |
adjustTo |
numeric: value to which titers below the detection limit will be adjusted |
Function returns et50 and slope PoD curve parameters obtained using efficacySquaredError
i.e. the opimal (output) parameters et50 and slope correspond to the minimal squared difference between input reference efficacy and calculated efficacy.
Pmax parameter is not obtained as efficacy is independent on pmax.
The optim
function is used for optimization with method = "L-BFGS-B", 1000 maximum itiretations, (0.1,Inf) boundaries for et50 and (-slopeBoundary, slopeBoundary) boundaries for slope.
NOTE: The reason for slope boundary settings is because from certain value of slope parameter the shape of the PoD curve and the corresponding PoD values for given titers are almost identical. This parameter is supposed to limit the resulting slope value and help MLE to converge to optimal parameters. The value of "slopeBoundaries" is calculated from data according to Dunning, 2015 (https://doi.org/10.1186/s12874-015-0096-9).
PoD curve parameters (et50, slope)
1 2 3 4 5 6 7 8 9 | ## Example 1
data(vaccinated)
data(control)
# Assigning reference efficacy
TrueEfficacy <- 0.53
# PoD curve parameter estimation
PoDEfficacySquaredError(TrueEfficacy, vaccinated, control)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.