Fits the scaled logit model as well as logistic regression. Does a likelihood ratio test.

check_baseline(
  formula = NULL,
  data = NULL,
  fit_sclr = NULL,
  fit_lr = NULL,
  conf_lvl = 0.95,
  verbose = TRUE
)

Arguments

formula

Formula to use for model fitting.

data

Optional dataframe.

fit_sclr

Fit object returned by sclr.

fit_lr

Fit object returned by glm.

conf_lvl

Confidence level for the test

verbose

Whether to print message based on test result.

Value

A tibble with a summary.

Examples

library(sclr) l1 <- sclr_ideal_data(n = 50, theta = 1e6, seed = 20191104) check_baseline(status ~ logHI, l1)
#> likely baseline of 1
#> # A tibble: 1 x 4 #> sclr_log_lkhd lr_log_lkhd test_statistic p_value #> <dbl> <logLik> <logLik> <logLik> #> 1 -15.4 -15.2758 -0.1608735 1