Skip to content
Celeus

Firth penalised logistic regression

Shown in the app as firth_logistic. Part of the method reference, under Regression.

When to use

Model a binary outcome when ordinary logistic regression breaks down: a predictor that perfectly (or almost perfectly) separates the outcome, or very few events per predictor. Firth's penalised likelihood returns FINITE odds ratios with profile-likelihood confidence intervals where the ordinary fit runs off to infinity.

What you provide

  • Outcome: one two-level column.
  • Predictors: one or more columns.

Options

Missing data

  • Complete case (listwise deletion)
  • Mean imputation (single)
  • Median imputation (single)

Multiple comparisons

  • Not adjustable for this method. Where it makes post-hoc comparisons, the procedure applies its own correction.

Confidence level

Every interval in the result is reported at the level you choose:

  • 90%
  • 95%
  • 99%

Other methods under Regression:

Guides that discuss this method

Worked examples

Celeus's result on a published or illustrative dataset, next to an independent computation and, where one exists, a published value. The data themselves are not reproduced here.

logistf::sex2

  • Source: Published dataset distributed with an R package
  • Licence: logistf (GPL)
  • Reference: Heinze G, Schemper M (2002), Statistics in Medicine 21:2409-2419 (the worked example); data from Cytel Inc., LogXact 9 user manual. The dataset and the model are the paper's; the numbers below are this engine's, checked against logistf run independently - not against the paper's printed table.
QuantityCeleusIndependent computationPublished valueAgrees
Estimate3.096013.09601-Yes
p-value0.004951870.00495187-Yes
Confidence interval0.774568, 8.0302900.774568, 8.030290-Yes
Number of observations239239-Yes

datasets::mtcars (am removed in rows 3, 7 and 11)

  • Source: Published dataset distributed with an R package
  • Licence: base R (GPL)
  • Reference: Henderson & Velleman (1981); the same logistf call on the 29 rows with an outcome
QuantityCeleusIndependent computationPublished valueAgrees
Estimate-2.98716-2.98716-Yes
p-value2.69437e-052.69437e-05-Yes
Confidence interval-6.09919, -1.20355-6.09919, -1.20355-Yes
Effect size0.05043050.0504305-Yes
Effect size confidence interval0.00224469, 0.300126000.00224469, 0.30012600-Yes
Test statistic for each model term17.622117.6221-Yes
Whole-model likelihood-ratio statistic17.622117.6221-Yes
Number of observations2929-Yes

datasets::mtcars (rows 1-15)

  • Source: Published dataset distributed with an R package
  • Licence: base R (GPL)
  • Reference: Henderson & Velleman (1981); the same logistf call
QuantityCeleusIndependent computationPublished valueAgrees
Estimate-6.49848-6.49848-Yes
p-value0.003416070.00341607-Yes
Confidence interval-25.55260, -1.45821-25.55260, -1.45821-Yes
Effect size0.001505720.00150572-Yes
Effect size confidence interval7.99219e-12, 2.32653e-017.99219e-12, 2.32653e-01-Yes
Test statistic for each model term8.570758.57075-Yes
Whole-model likelihood-ratio statistic8.570758.57075-Yes
Number of observations1515-Yes

datasets::mtcars (rows 1-15)

  • Source: Published dataset distributed with an R package
  • Licence: base R (GPL)
  • Reference: Henderson & Velleman (1981); the same logistf call
QuantityCeleusIndependent computationPublished valueAgrees
Estimate-6.49848-6.49848-Yes
p-value0.003416070.00341607-Yes
Confidence interval-21.11790, -2.01253-21.11790, -2.01253-Yes
Effect size0.001505720.00150572-Yes
Effect size confidence interval6.73945e-10, 1.33650e-016.73945e-10, 1.33650e-01-Yes
Test statistic for each model term8.570758.57075-Yes
Whole-model likelihood-ratio statistic8.570758.57075-Yes
Number of observations1515-Yes

datasets::mtcars

  • Source: Published dataset distributed with an R package
  • Licence: base R (GPL)
  • Reference: Henderson & Velleman (1981); the same logistf call
QuantityCeleusIndependent computationPublished valueAgrees
Estimate4.088234.08823-Yes
p-value1.06197e-061.06197e-06-Yes
Confidence interval1.88229, 9.008261.88229, 9.00826-Yes
Effect size59.634459.6344-Yes
Effect size confidence interval6.56854, 8170.320006.56854, 8170.32000-Yes
Test statistic for each model term23.812423.8124-Yes
Whole-model likelihood-ratio statistic23.812423.8124-Yes
Number of observations3232-Yes

Validation report

References

  1. Firth, D. (1993). Bias reduction of maximum likelihood estimates. Biometrika 80: 27-38. doi:10.1093/biomet/80.1.27 doi:10.1093/biomet/80.1.27
  2. Heinze, G., Schemper, M. (2002). A solution to the problem of separation in logistic regression. Statistics in Medicine 21: 2409-2419. doi:10.1002/sim.1047 doi:10.1002/sim.1047