Used to fit the scaled logit model from Dunning (2006).
sclr(
formula,
data = NULL,
ci_lvl = 0.95,
tol = 10^(-7),
algorithm = c("newton-raphson", "gradient-ascent"),
nr_iter = 2000,
ga_iter = 2000,
n_conv = 3,
conventional_names = FALSE,
seed = NULL
)
an object of class "formula": a symbolic description of the model to be fitted.
a data frame.
Confidence interval level for the parameter estimates.
Tolerance.
Algorithms to run. "newton-raphson" or "gradient-ascent". If a character vector, the algorithms will be applied in the order they are present in the vector.
Maximum allowed iterations for Newton-Raphson.
Maximum allowed iterations for gradient ascent.
Number of times the algorithm has to converge (to work around local maxima).
If TRUE
, estimated parameter names will be
(Baseline), (Intercept) and the column names in the model matrix. Otherwise
- lambda, beta_0 and beta_ prefix in front of column names in the model
matrix.
Seed for the algorithms.
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.
Algorithm used.
Everything the algorithm returned.
The number of Newton-Raphson iterations (including resets) that were required for convergence.
Model matrix derived from formula
and data
.
Response matrix derived from formula
and data
.
The original call to sclr
.
Model frame object derived from formula
and
data
.
Terms object derived from model frame.
Confidence intervals of the parameter estimates.
Value of log-likelihood calculated at the ML estimates of parameters.
Passed formula.
Passed data.
Methods supported: print, vcov, coef, model.frame, model.matrix, summary, predict, tidy (broom package), logLik.
The model is logistic regression with an added parameter for the top
asymptote. That parameter is reported as theta
(or (Baseline)
if conventional_names = TRUE
). Note that it is reported on the logit
scale. See vignette("sclr-math")
for model specification,
log-likelihood, scores and second derivatives. The main default optimisation
algorithm is Newton-Raphson. Gradient ascent is used as a fallback by
default. 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, one_titre_data)
summary(fit1)
# }
Run the code above in your browser using DataLab