Used to fit the scaled logit model from Dunning (2006).
sclr(formula, data, calc_ci = TRUE, ci_lvl = 0.95, calc_ll = TRUE,
tol = 10^(-7), n_iter = NULL, max_tol_it = 10^4)an object of class "formula": a symbolic description of the model to be fitted.
a data frame.
Whether to calculate confidence intervals.
Confidence interval level for the parameter estimates.
Whether to calculate log likelihood at MLEs.
Tolerance. Used when n_iter is NULL.
Number of Newton-Raphson iterations. tol is ignored when
this is not NULL.
Maximum tolerated iterations. If it fails to converge within this number of iterations, will return with an error.
An object of class sclr. This is a list with the following
elements:
Maximum likelihood estimates of the parameter values.
The variance-covariance matrix of the parameter estimates.
The number of Newton-Raphson iterations (including resets) that were required for convergence.
Confidence intervals of the parameter estimates.
Model matrix derived from formula and data.
Response matrix derived from formula and data.
Value of log-likelihood calculated at the ML estimates of parameters.
The original call to sclr.
Model frame object derived from formula and
data.
Terms object derived from model frame.
The model is of the form $$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, (eg. 1 - infected, 0 - not infected). \(X\) - covariate.
\(k\) - number of covariates. Computing engine behind the fitting is
sclr_fit.
Dunning AJ (2006). "A model for immunological correlates of protection." Statistics in Medicine, 25(9), 1485-1497. https://doi.org/10.1002/sim.2282.
# NOT RUN {
library(sclr)
fit1 <- sclr(status ~ logHI, sclr_one_titre_data)
summary(fit1)
# }
Run the code above in your browser using DataLab