predict.sclr: Predict method for scaled logit model x.

Description Usage Arguments Details Value

View source: R/methods.R

Description

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

Usage

1
2
## S3 method for class '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.

Details

The model is

P(Y = 1) = λ(1 - logit^{-1}(β_0 + β_1X_1 + β_2X_2 + ... + β_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

β_0 + β_1X_1 + β_2X_2 + .. . + β_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.

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.


khvorov45/dunmle documentation built on March 4, 2020, 7:16 p.m.