Learn R Programming

sclr

The goal of sclr is to fit the scaled logit model from Dunning (2006) using the maximum likelihood method. The package website contains all documentation, vignettes and version history.

Installation

Install the CRAN version with

install.packages("sclr")

Or the development version from GitHub with:

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

Model

The model is logistic regression with an added parameter for the top asymptote. For model specification, log likelihood, scores and second derivatives see the math vignette. 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, one_titre_data) # included simulated data
summary(fit)
#> Call: status ~ logHI
#> 
#> Parameter estimates
#>       theta      beta_0  beta_logHI 
#> -0.03497876 -5.42535734  2.14877741 
#> 
#> 95% confidence intervals
#>                 2.5 %      97.5 %
#> theta      -0.1350572  0.06509969
#> beta_0     -6.4417802 -4.40893449
#> beta_logHI  1.8146909  2.48286390
#> 
#> Log likelihood: -2469.765

For more details see the usage vignette.

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.3.1

License

MIT + file LICENSE

Maintainer

Arseniy Khvorov

Last Published

March 2nd, 2020

Functions in sclr (0.3.1)

tidy.sclr

Tidy a sclr object.
two_titre_data

Simulated two-titre antibody data
coef.sclr

ML estimate components
sclr_log_likelihood

Log-likelihood
sclr_ideal_data

Generate ideal data for the scaled logit model
sclr_fit

Fitter function for the scaled logit model
check_baseline

Check for baseline boundary
one_titre_data

Simulated one-titre antibody data
predict.sclr

Predict method for scaled logit model x.
new_sclr

Create a new sclr object
sclr

Fits the scaled logit model
get_protection_level

Protection level calculations
find_prot_titre_val

Search function for scaled logit protection covariate levels
print.sclr

Print a sclr object.