Calculates covariate values corresponding to a particular protection level.
Only accepts one covariate at a time, fixed values of all the others should
be provided. The search engine is find_prot_titre_val
.
get_protection_level(
fit,
var_name,
newdata = NULL,
lvl = 0.5,
ci_level = 0.95,
tol = 10^(-7)
)
Object returned by sclr
.
Name of the covariate for which to find values corresponding
to a protection level. This name should appear in the formula in the call
to sclr
which was used to generate fit
.
A dataframe with all covariates except the one for which
protection values should be calculated. If there is only one covariate, can
be left as NULL
(the default)
Protection level to find covariate values for. Default is 0.5 (50%)
Confidence level for the calculated interval. Default is 0.95.
Tolerance. The values will be found numerically, once the
algorithm converges within tol
of lvl
it stops looking.
Default is \(10^(-7)\).
A tibble
. Will have the same variables as
newdata
with the addition of the var_name
variable.