Maximum likelihood estimators have rich mathematical structure—they’re consistent, asymptotically normal, efficient. algebraic.mle exposes this structure through an algebra where MLEs are objects you compose, transform, and query.
The Core Abstraction
An MLE isn’t just parameter estimates—it’s a statistical object carrying:
- Point estimates \(\hat{\theta}\)
- Fisher Information matrix \(I(\hat{\theta})\)
- Variance-covariance matrix \(I^{-1}(\hat{\theta})\)
- Confidence intervals (Wald-type from asymptotic normality)
- Log-likelihood value
- Convergence diagnostics
The package wraps all of this in a consistent interface:
library(algebraic.mle)
fit <- mle(likelihood_model, data)
coef(fit) # Parameter estimates
vcov(fit) # Variance-covariance matrix
confint(fit) # Confidence intervals
logLik(fit) # Log-likelihood
aic(fit) # Model selection
Algebraic Operations
The real power: MLEs compose. Independent models combine:
fit1 <- mle(model1, data1)
fit2 <- mle(model2, data2)
combined <- fit1 + fit2 # Joint likelihood
The package handles the algebra—joint log-likelihood, block-diagonal Fisher Information, everything propagates correctly.
The Ecosystem
algebraic.mle is the foundation for a family of packages:
| Package | Purpose |
|---|---|
| likelihood.model | Compositional likelihood specification |
| likelihood.model.series.md | Masked failure data in series systems |
| mdrelax | Relaxed masking conditions |
| algebraic.dist | Distributions as algebraic objects |
| dfr.dist | Dynamic failure rate distributions |
| hypothesize | Likelihood ratio tests on MLEs |
| numerical.mle | Numerical optimization backends |
How They Connect
The flow typically looks like:
- Define distributions with
algebraic.dist - Specify likelihood contributions with
likelihood.model - Fit the model → get an
mleobject fromalgebraic.mle - Query statistical properties: CIs, hypothesis tests, model selection
For series systems with masked data:
library(likelihood.model.series.md)
library(algebraic.mle)
# Specify masking model (C1-C2-C3 conditions)
model <- md_likelihood_model(components = 3, masking = "bernoulli")
# Fit → returns algebraic.mle object
fit <- md_mle_exp_series_C1_C2_C3(masked_data)
# All the standard MLE methods work
confint(fit)
vcov(fit)
aic(fit)
Theoretical Foundation
The asymptotic properties that algebraic.mle exploits come from classical MLE theory:
The expo-masked-fim paper derives closed-form Fisher Information for exponential series systems—this is exactly what algebraic.mle uses internally for variance estimation in that case.
For more complex models (Weibull, relaxed conditions), we compute Fisher Information numerically via observed information:
$$\hat{I}(\hat{\theta}) = -\frac{\partial^2 \ell}{\partial \theta \partial \theta^T}\bigg|_{\theta=\hat{\theta}}$$Why This Matters
Separation of concerns: The likelihood specification (likelihood.model) is independent of the fitting algorithm (numerical.mle) and the result type (algebraic.mle). You can swap optimizers without changing downstream code.
Correctness by construction: Standard errors, confidence intervals, and hypothesis tests are computed from the Fisher Information—not ad-hoc formulas. If your likelihood is correct, statistical inference follows automatically.
Composability: Build complex models from simpler ones. The algebra ensures properties propagate correctly.
Connection to My Thesis
This package directly supports the work in my master’s thesis on reliability estimation in series systems. The bootstrap confidence intervals, likelihood ratio tests, and model selection all use algebraic.mle objects.
Resources
- GitHub: github.com/queelius/algebraic.mle
- Documentation: queelius.github.io/algebraic.mle
- Related paper: Closed-Form Fisher Information
- Companion package: algebraic.dist (distributions as algebraic objects)
Discussion