MyNixOS website logo
Description

Masked-Cause Likelihood Models for Series Systems with Arbitrary Hazard Components.

Likelihood-based inference for series systems with masked component cause of failure, using arbitrary dynamic failure rate component distributions. Computes log-likelihood, score, Hessian, and maximum likelihood estimates for masked data satisfying conditions C1, C2, C3 under general component hazard functions. Implements the 'series_md' protocol defined in the 'maskedcauses' package.

maskedhaz

Masked-Cause Likelihood Models for DFR Series Systems

maskedhaz provides likelihood-based inference for series systems with masked component cause of failure. A series system fails when any component fails, but the causing component may be unknown (masked). Given candidate sets satisfying conditions C1-C2-C3, this package computes log-likelihood, score, Hessian, and MLE for the component parameters.

Unlike closed-form implementations, this package works with arbitrary component hazard functions from flexhaz — Weibull, Gompertz, log-logistic, or any custom dfr_dist.

Installation

Install from r-universe:

install.packages("maskedhaz", repos = "https://queelius.r-universe.dev")

Quick Start

library(maskedhaz)

# Three-component exponential series system
model <- dfr_series_md(components = list(
    dfr_exponential(0.1),
    dfr_exponential(0.2),
    dfr_exponential(0.3)
))

# Generate masked data with right-censoring
rdata_fn <- rdata(model)
set.seed(42)
df <- rdata_fn(theta = c(0.1, 0.2, 0.3), n = 500, tau = 10, p = 0.5)

# Evaluate log-likelihood
ll_fn <- loglik(model)
ll_fn(df, par = c(0.1, 0.2, 0.3))

# Fit via MLE
solver <- fit(model)
result <- solver(df, par = c(0.5, 0.5, 0.5))
coef(result)    # parameter estimates
vcov(result)    # variance-covariance matrix
confint(result) # confidence intervals

Mixed Component Types

The package supports arbitrary dfr_dist component distributions:

# Weibull wear-out + exponential random failure
model <- dfr_series_md(components = list(
    dfr_weibull(shape = 2, scale = 100),
    dfr_exponential(0.05)
))

rdata_fn <- rdata(model)
set.seed(42)
df <- rdata_fn(theta = c(2, 100, 0.05), n = 300, tau = Inf, p = 0.3)

solver <- fit(model)
result <- solver(df, par = c(1.5, 120, 0.03))
coef(result)

Observation Types

The data frame uses an omega column to indicate observation type:

omega valueMeaning
"exact"Failed at time t, cause masked among candidates
"right"Right-censored: survived past time t
"left"Left-censored: failed before time t
"interval"Failed in interval (t, t_upper)

Candidate sets are Boolean columns x1, x2, ..., xm.

Key Features

  • General hazards: Works with any dfr_dist component — no closed-form assumptions
  • Full censoring support: Exact, right, left, and interval censoring
  • Masked cause: Candidate sets satisfying C1-C2-C3 masking conditions
  • MLE fitting: fit() returns fisher_mle with coef(), vcov(), confint()
  • Data generation: rdata() simulates masked series system data
  • Diagnostics: Conditional and marginal cause-of-failure probabilities
  • Cross-validated: Matches closed-form results from maskedcauses

Ecosystem

maskedhaz builds on:

Cross-validated against:

  • maskedcauses — Closed-form exponential/Weibull series likelihoods.
Metadata

Version

0.1.0

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows