Returns only the protection estimates. The only supported interval is a confidence interval (i.e. the interval for the estimated expected value).

# S3 method for sclr
predict(object, newdata, ci_lvl = 0.95, ...)

Arguments

object

Object returned by sclr.

newdata

A dataframe with all covariates. Names should be as they appear in the formula in the call to sclr.

ci_lvl

Confidence level for the calculated interval.

...

Not used. Needed to match generic signature.

Value

A tibble obtained by adding the following columns to newdata:

prot_point_lin prot_l_lin prot_u_lin

Point estimate, low and high bounds of the linear transformation.

prot_sd_lin

Estimated standard deviation of the linear transformation.

prot_point prot_l prot_u

Inverse logit-transformed point estimate, low and high bounds of the linear transformation.

Details

The model is $$P(Y = 1) = \lambda(1 - logit^{-1}(\beta_0 + \beta_1X_1 + \beta_2X_2 + ... + \beta_kX_k))$$ Where \(Y\) is the binary outcome indicator, (e.g. 1 - infected, 0 - not infected). \(X\) - covariate. \(k\) - number of covariates. This function calculates $$\beta_0 + \beta_1X_1 + \beta_2X_2 + .. . + \beta_kX_k$$ transformations at the covariate values found in newdata as well as the variance-covariance matrices of those transformations. This is used to calculate the confidence intervals at the given parameter values. The inverse logit transformation is then applied to point estimates and interval bounds.