PoDEfficacySquaredError: Optimization function: finds PoD curve paramaters (et50,...

Description Usage Arguments Details Value Examples

View source: R/FunctionsPoDParameters.R

Description

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.

Usage

1
2
3
4
5
6
7
PoDEfficacySquaredError(TrueEfficacy, 
                        vaccinated, 
                        control,
                        initialSlope = 6,
                        adjustTiters = FALSE, 
                        adjustFrom = NA, 
                        adjustTo = NA)

Arguments

TrueEfficacy

numeric: input reference efficacy

vaccinated

Population-class object: vaccinated group (mean, sd)

control

Population-class object: control group (mean, sd)

initialSlope

numeric: initial slope parameter for the optimization function

adjustTiters

boolean: set to TRUE if titer values should be adjusted, for details see PoD function

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

Details

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).

Value

PoD curve parameters (et50, slope)

Examples

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)

PoDBAY documentation built on Sept. 21, 2021, 5:08 p.m.