Learn R Programming

⚠️There's a newer version (0.3.1) of this package.Take me there.

sclr

The goal of sclr is to fit the scaled logit model from Dunning (2006) using the maximum likelihood method.

Installation

The package is not yet on CRAN. You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("khvorov45/sclr")

Model

For log likelihood, scores and second derivatives see vignette("Math", "sclr"). Documentation of the main fitting function ?sclr has details on how the model is fit.

Example

Usage is similar to other model fitting functions like lm.

library(sclr)
fit <- sclr(status ~ logHI, sclr_one_titre_data)
summary(fit)
#> Call: status ~ logHI
#> 
#> Parameter estimates
#>     lambda     beta_0 beta_logHI 
#>   0.243828  -7.763952   2.088048 
#> 
#> 95% confidence intervals
#>                 2.5 %     97.5 %
#> lambda      0.2255282  0.2621277
#> beta_0     -9.6362901 -5.8916139
#> beta_logHI  1.6458693  2.5302271

For more details see vignette("Usage", "sclr").

References

Dunning AJ (2006). “A model for immunological correlates of protection.” Statistics in Medicine, 25(9), 1485-1497. doi: 10.1002/sim.2282.

Copy Link

Version

Install

install.packages('sclr')

Monthly Downloads

166

Version

0.1.0

License

MIT + file LICENSE

Maintainer

Arseniy Khvorov

Last Published

September 4th, 2019

Functions in sclr (0.1.0)

predict.sclr

Predict method for scaled logit model x.
sclr

Fits the scaled logit model
find_prot_titre_val

Search function for scaled logit protection covariate levels
sclr_two_titre_data

Simulated two-titre antibody data
get_protection_level

Protection level calculations
sclr_one_titre_data

Simulated one-titre antibody data
print.sclr

Print a sclr object.
coef.sclr

ML estimate components
tidy.sclr

Tidy a sclr object.
sclr_fit

Fitter function for the scaled logit model
sclr_log_likelihood

Log-likelihood