Skip to main content

algebraic.mle: The Foundation of a Statistical Inference Ecosystem

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:

PackagePurpose
likelihood.modelCompositional likelihood specification
likelihood.model.series.mdMasked failure data in series systems
mdrelaxRelaxed masking conditions
algebraic.distDistributions as algebraic objects
dfr.distDynamic failure rate distributions
hypothesizeLikelihood ratio tests on MLEs
numerical.mleNumerical optimization backends

How They Connect

The flow typically looks like:

  1. Define distributions with algebraic.dist
  2. Specify likelihood contributions with likelihood.model
  3. Fit the model → get an mle object from algebraic.mle
  4. 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:

$$\sqrt{n}(\hat{\theta}_n - \theta^*) \xrightarrow{d} \mathcal{N}(0, I^{-1}(\theta^*))$$

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

Discussion