No articles match
dist.structure integration2 months ago
Two packages, two missions | What kofn delegates to dist.structure | When you might invoke dist.structure directly | Convention conversion | Migration notes: v0.2.0 -> v0.3.0 | Why this architecture
Exponential Parallel Systems: Closed-Form MLE via Inclusion-Exclusion2 months ago
The Exponential Parallel System | Inclusion-Exclusion Expansion | Likelihood Under Different Observation Types | Maximum Likelihood Estimation | Data generation | Fitting | Comparison with true values | Permutation Symmetry | Monte Carlo Validation | Results | Observation Functors | Scheme 0: System lifetime with right-censoring | Effect of censoring on estimation | Scheme 1: Periodic inspection
Getting started with kofn2 months ago
What kofn does | Your first fit | Convention | Observation schemes | Weibull components | Periodic inspection (Scheme 1) | Masked cause-of-failure | Fisher information comparison | What's next
Inside kofn: Building on the rlang MLE Stack2 months ago
The design in one paragraph | The stack | A running example | Layer 1: the likelihood calculus (likelihood.model) | Layer 2: the optimizer (compositional.mle) | Layer 3: the MLE object (algebraic.mle) | Layer 4: the distribution bridge (algebraic.dist) | What had to be specialized | Extending the stack | Further reading
Observation Scheme Composability2 months ago
The Observe Functor API | Composing Schemes with rdata | Effect on Estimation | Mixed Observation Environments
Observation Schemes: Resolving Information Asymmetry via Periodic Inspection2 months ago
Introduction | 1. The observation scheme hierarchy | 2. The information asymmetry problem | 3. Scheme 1: Periodic inspection | The likelihood | 4. Scheme 0 vs Scheme 1 comparison | Monte Carlo comparison | 5. Sensitivity to inspection interval width | 6. Information-theoretic interpretation | 7. Fisher information comparison | 8. Scheme 1 across the k-spectrum | 9. Practical guidelines
Weibull Parallel Systems: EM Algorithm for Shape-Scale Estimation2 months ago
Why Weibull? | What breaks: from exponential to Weibull | Direct MLE struggles | The EM algorithm | E-step: classification and truncated moments | M-step: profile optimization | EM vs direct MLE comparison | Shape effect on estimation difficulty | Mixed shapes: DFR + IFR systems | Base R stats integration | Summary
Implementing a dist_structure subclass3 months ago
The contract: four steps | A worked example: an alarm system | Step 1: pick a representation | Step 2: write the constructor | Step 3: implement the three required generics | Step 4: validate | What you get for free | When to override a default | Inheriting from coherent_dist | What the default dual does | Cross-references
Getting started with dist.structure3 months ago
What dist.structure is | Your first structured distribution | Structural queries | A richer topology: k-out-of-n | Sampling, means, and composition | Importance measures | What to read next | Ecosystem
Non-coherent systems: cold standby3 months ago
Why "non-coherent" | Constructing a cold standby | Mean and sampling: exact | Survival and CDF: Monte Carlo with caching | Specialized closed-form case: iid exponentials | What cold standby does NOT support | When to reach for cold standby
Coherent systems3 months ago
What is a coherent system | The structure function phi | Minimal path and cut sets | The bridge network | Arbitrary coherent systems | Structural importance | Reliability polynomial | Critical states | Dual systems | Validating a custom topology | Summary
Composition and substitution3 months ago
Building new systems from old | Substituting a component | Hierarchical composition | Series of parallels | Parallel of series | Mixing a sub-system with a plain dist | Arbitrary depth | Substitution vs composition
Distribution interface3 months ago
dist_structure IS-A dist | Default dist methods | Choosing specializations vs general constructors | Closed-form specializations in dist.structure | min, max, and order statistics as dist_structure | Density and hazard | The dist.structure + algebraic.dist stack
Importance measures3 months ago
Four measures, four questions | Setting up the bridge | Structural importance | Birnbaum reliability importance | Time-dependent importance via criticality | Vesely-Fussell importance | Comparison | Closed-form checks | When to use which
Censoring Types and Masked Causes3 months ago
Two Independent Sources of Information Loss | The omega Column | Contribution Formulas | Worked Examples | Exact and right-censored | Left-censored | Interval-censored | Mixed observation types | Cross-Validation Against a Reference Implementation | Identifiability Under Masking | Summary
Hypothesis Testing on Fitted Models3 months ago
Why a Separate Vignette? | The Scenario | Question 1: Is the Exponential Family Adequate? | Question 2: Is Each Individual Shape Significantly Different from 1? | Question 3: Controlling Family-Wise Error | Question 4: Composite Hypotheses | Question 5: A Score Test Without Refitting | Question 6: Confidence Intervals by Test Inversion | Cross-Implementation Check | Summary
maskedhaz: Masked-Cause Likelihood for General Series Systems3 months ago
The Problem | The series_md Protocol and This Implementation | Quick Tour | Step 1: generate data | Step 2: evaluate the log-likelihood | Step 3: fit via MLE | Step 4: the fit is a distribution | Step 5: diagnostics | The Ecosystem | Protocol stack (model classes) | Component stack (what goes inside a series system) | MLE result stack | Where to Go Next | Assumptions
Mixed-Distribution Series Systems3 months ago
The Motivation | A Worked Example: Medical Device with Four Failure Modes | Simulating Field Data | Fitting | Why Identifiability Works for Mixed Families | Defining Your Own Component | Summary
Fitting Series Systems to Data4 months ago
Introduction | Data Format | Basic Fitting Workflow | Step 1: Define the System Model | Step 2: Simulate Training Data | Step 3: Fit the Model | Step 4: Extract Results | Initial Parameter Selection | Identifiability | Exponential Series: Non-Identifiable | Mixed Types: Identifiable | Handling Censored Data | Model Diagnostics | Log-Likelihood Comparison | Model Assumptions | Confidence Intervals | Wald Confidence Intervals | Delta Method for MTBF
Mathematical Foundations of Series Systems4 months ago
Series System Theory | Key Properties | Property 1: Hazard Sum | Property 2: Survival Product | Property 3: Cumulative Hazard Sum | Property 4: Density Formula | The Parameter Layout | Analytical vs. Numerical Cumulative Hazard | Score Function: Decomposed Gradient | The naive approach | How serieshaz decomposes the gradient | The all-censored trick | Numerical demonstration | Score at the MLE | Decomposed Hessian | Special Cases | Exponential Series = Exponential(sum of rates) | Identical Weibull Components | Single Component (Degenerate Case)
Custom Contributions and Model Comparison4 months ago
When contr_name() Is Not Enough | Analytical Derivatives | Model Comparison with LRT | Fisher Information via Monte Carlo
Introduction to likelihood.contr4 months ago
The Problem | Declaring Contributions | Composing a Model | Simulating Censored Data | Fitting the Model | Evaluating the Log-Likelihood Directly | Function-Based Dispatch | Next Steps
Masked Series Systems4 months ago
Competing Risks with Masked Failure Causes | Building the Model | Simulating Masked Data | Fitting | Why This Works
Fitting Common Distributions to a DGP4 months ago
Introduction | Data Simulation | Visualizing Data | Parametrically Modeling the Data | Maximum Likelihood Estimation | Performance Measures of the MLE | Invariance Property of the MLE | Delta Method | Monte-Carlo Method | Example 1 | Combining Independent MLEs | Example 2 | Bootstrapping the MLEs | Goodness-of-Fit | Prediction Intervals | Conclusion
Exponential Lifetime Model4 months ago
Introduction | Uncensored Data | Closed-Form MLE | How the Closed-Form MLE Works | Right-Censored Data | Fitting with Censoring | Ignoring Censoring Leads to Bias | Analytical Derivatives | Fisher Information Matrix | Fisherian Likelihood Inference | Likelihood Intervals | Profile Log-Likelihood | Monte Carlo Validation with rdata() | Summary | Session Info
Getting Started with likelihood.model4 months ago
Introduction | Installation | Loading Packages | Example 1: Closed-Form MLE with Exponential Lifetime Model | Extracting Results | Example 2: Right-Censored Exponential Data | Example 3: Verifying the Score at MLE | Example 4: Fisherian Likelihood Inference | Likelihood Intervals | Example 5: Evidence Function | Example 6: Bootstrap Sampling Distribution | Summary of Key Functions | Model Creation | Likelihood Calculus | Estimation and Inference | Fisherian Inference | Model Comparison | Next Steps | Session Info
Integration with algebraic.mle and algebraic.dist4 months ago
The Three-Package Ecosystem | Basic Interface: params, nparams, observed_fim | Parameter Transformations via rmap | Monte Carlo Expectations | Mean Squared Error | Bootstrap Integration | Using algebraic.dist Distributions | Summary
Designing Optimization Strategies4 months ago
Introduction | The Problem: Why Composition? | Single Solver: Often Fails | Strategy 1: Coarse-to-Fine | Strategy 2: Multiple Restarts | Strategy 3: Racing Solvers | Strategy 4: Global + Local | Diagnosing Convergence | Extracting Trace Data | Benchmarking Strategies | Best Practices | 1. Start Simple, Add Complexity | 2. Use Domain Knowledge for Initialization | 3. Match Solver to Problem | 4. Monitor Convergence | Summary
Getting Started with compositional.mle4 months ago
Introduction | Installation | Quick Start: Normal Distribution MLE | The Problem-Solver Separation | Composing Solvers | Sequential Chaining (%>>%) | Three-Stage Refinement | Parallel Racing (%|%) | Random Restarts | Conditional Refinement | Available Solvers | Constraints | Function Transformers | Stochastic Gradient (Mini-batching) | Regularization | Tracing Optimization | API Summary
The MLE Ecosystem4 months ago
Introduction | Composing Solvers | The mle Result Object | Combining Independent MLEs | Hypothesis Testing with hypothesize | Creating tests from MLE results | Combining independent tests | The testing interface | Automatic Differentiation | The likelihood.model Bridge | The Ecosystem at a Glance
Theory and Intuition Behind Numerical MLE4 months ago
What is Maximum Likelihood Estimation? | The Likelihood Function | Why Log-Likelihood? | A Concrete Example | The Score Function | Intuition | Gradient Ascent | Why It Works | The Challenge: Choosing the Step Size | Line Search: Automatic Step Size Selection | The Fisher Information Matrix | Why It Matters | Observed vs Expected Fisher Information | Newton-Raphson | Comparison | Composing Solvers | When to Use Which Method | Constrained Optimization | Projection Method | Regularization and Penalized Likelihood | Penalized Log-Likelihood | Common Penalties | Summary | Further Reading
Introduction to hypothesize4 months ago
What is hypothesize? | The Hypothesis Testing Interface | Primitive Tests | The Z-Test: Simplest Case | The Wald Test: General Parameters | The Likelihood Ratio Test: Comparing Models | Duality: Tests and Confidence Intervals | The Closure Property: Combining Tests | Higher-Order Functions: Transforming Tests | Extending the Package | Summary
The Algebra of MLEs5 months ago
Introduction | Creating MLEs | Direct construction with mle() | From numerical optimization with mle_numerical() | From bootstrap with mle_boot() | Composing Independent MLEs | Combining Repeated Estimates | Transformations via Invariance | Univariate example: rate to mean lifetime | Multivariate example: component rates to system reliability | Bridging to Distribution Algebra | Full Pipeline
Statistics and characteristics of the MLE5 months ago
Installation | Normal distribution | Monte-carlo (MC) simulation of the sampling distribution of the MLE | Bias | Variance-covariance matrix | Confidence intervals | Mean squared error matrix | Bootstrap of the sampling distribution of the MLE | Prediction intervals | Combining Independent MLEs
Dynamic failure rate model5 months ago
Installation | Purpose | API Overview | Fitting exponential models | Hypothesis test and model selection
A Likelihood Framework for Masked Series Systems5 months ago
Introduction | Series System Model | Definition | System reliability | Additive hazards | R code: Exponential example | Component Cause of Failure | Conditional cause probability | R code: Exponential vs Weibull cause probabilities | The Observational Model | Four observation types | Masking | Observe functors | The C1--C2--C3 Likelihood | The three conditions | Deriving the likelihood | Censored observations | Combined log-likelihood | R code: Log-likelihood evaluation | Distribution Families | Worked Example: Exponential Components | Setup | Specializing the likelihood | Data generation and fitting | Score and Hessian verification | Fisher information and confidence intervals | Homogeneous Weibull | Key properties | R code: Setup and hazard visualization | Cause probabilities | Data generation and MLE | Heterogeneous Weibull | Differences from the homogeneous model | R code: Mixed failure regimes | Time-varying cause probabilities | Model comparison: heterogeneous vs homogeneous | Monte Carlo Assessment | Practical Considerations
Censoring Types in Series System Masked Data5 months ago
Overview of Observation Types | Data Generation with Observe Functors | Exponential Model: Closed-Form Verification | Simulation: Information Content by Censoring Mix | Results Table | Visualization | Per-Component Detail | Key Findings | Cross-Model Comparison Under Mixed Censoring | Computational Considerations | Practical Recommendations
Heterogeneous Weibull Series Systems: Flexible Hazard Shapes5 months ago
Motivation | Component hazard and cause probability profiles | Hazard functions | Conditional cause probability | Numerical integration for left and interval censoring | Why numerical integration is necessary | Timing comparison | MLE with mixed censoring | Model comparison: heterogeneous vs homogeneous | Monte Carlo study | Bias, variance, and MSE | Confidence interval coverage | Sampling distribution | Summary
Homogeneous Weibull Series Systems: Shared Shape Parameter5 months ago
Theory | Component lifetime model | System lifetime | Conditional cause probability | Marginal cause probability | Connection to the exponential model | Worked Example | Component hazards | Cause probabilities | Data generation with periodic inspection | Likelihood Contributions | Exact observation ($\omega_i = \text{exact}$) | Right-censored ($\omega_i = \text{right}$) | Left-censored ($\omega_i = \text{left}$) | Interval-censored ($\omega_i = \text{interval}$) | Why homogeneous shapes enable closed forms | MLE Fitting | Score and Hessian computation | Monte Carlo Simulation Study | Bias and MSE by shape regime | Confidence interval coverage | Censoring rates | Sampling distribution visualization | Interpretation | Weibull($k=1$) = Exponential Identity
Masked Data Likelihood Model: Components with Exponentially Distributed Lifetimes Arranged In Series Configuration5 months ago
Exponentially Distributed Component Lifetimes | Likelihood Model | Candidate set models | Reduced likelihood model | Bernoulli candidate set model #1 | Bernoulli candidate set model #2 | Simulation | Masked component cause of failure | Constructing the Likelihood Model | Maximum likelihood estimation | Log-likelihood of $\theta$ given masked data | Observation Types and Censoring | Observe functors | Generating mixed-censoring data | Likelihood evaluation on mixed-censoring data | Monte Carlo simulation study | Bias, Variance, and MSE | Confidence Interval Coverage | Sampling Distribution Visualization | Summary | Sensitivity Analysis | Effect of Masking Probability | Effect of Right-Censoring Rate | Practical Recommendations
Model Selection for Masked Series Systems via Likelihood Ratio Tests5 months ago
Introduction | The Weibull Nesting Chain | Three levels of complexity | The two LRT steps | Physical interpretation | Top-down testing cascade | Worked Example: Homogeneous True Model | Setup and data generation | Fitting all three models | Likelihood ratio tests | Worked Example: Heterogeneous True Model | Monte Carlo Study: Power of the Heterogeneity Test | Design | Rejection rates | Power curve | AIC/BIC model selection accuracy | Practical Guidelines
Package Ecosystem: Reliability Analysis with Masked Failure Data5 months ago
The Problem | Package Ecosystem | Foundation: Distribution and MLE Infrastructure | Hazard-Based Components: flexhaz | Series System Topology: serieshaz | This Package: maskedcauses | General Masked Inference: maskedhaz | Choosing the Right Package
Boolean Algebra of Hypothesis Tests5 months ago
The Idea | The Trinity: Three Ways to Test a Hypothesis | Boolean Algebra: AND, OR, NOT | NOT: The Complement | AND: The Intersection | OR: The Union (via De Morgan) | The Full Algebra | Test-Confidence Duality | Multivariate Tests | The Design as an Algebra
Multivariate and Mixture Distributions5 months ago
MVN Basics | Sampling | Marginals | Closed-Form MVN Conditioning | Predicate-based MC fallback | Affine Transformations | Portfolio example | Dimensionality reduction | Mixture Distribution Basics | Mean and variance | Density and CDF | Mixture Operations | Marginals of mixtures | Conditional of mixtures (Bayesian weight update) | Practical Example: Gaussian Mixture Classification | Setup: a two-class GMM | Visualise the clusters | Soft classification by conditioning | Ambiguous observations
Distribution Algebra with algebraic.dist5 months ago
Introduction | Basic Arithmetic | Automatic Simplification | Normal algebra | Exponential and Gamma algebra | Transform rules | Other simplification rules | When Simplification Cannot Help | Realization and MC Fallback | Min, Max, and Summary Operations | Limiting Distributions | Central Limit Theorem | Law of Large Numbers | Delta Method | Moment-Matching Normal Approximation | Empirical CLT Convergence
Reliability Engineering Applications5 months ago
Introduction | Case Study 1: Capacitor Lifetime Analysis | The Data | Model Comparison | Model Selection | Interpretation | Case Study 2: B-Life Calculations | Visual Representation | Case Study 3: Warranty Analysis | Case Study 4: Maintenance Scheduling | Case Study 5: Competing Failure Modes | Model Diagnostics | Summary | Best Practices
Creating Custom Distributions5 months ago
The Power of Custom Hazards | The Three Functions | Level 1: Just the Hazard | Level 2: Add Analytical Cumulative Hazard | Level 3: Add Analytical Score Function | Complete Example: Makeham Distribution | Step 1: Derive the Mathematics | Step 2: Implement | Step 3: Test | Writing Custom Derivative Functions | Use Standard R Indexing | Return Correct Types | Handle Censoring | Performance Comparison | Real-World Example: Bathtub Curve | Summary | Next Steps
Custom Derivatives for Maximum Likelihood Estimation5 months ago
Introduction | Setup | The Weibull Distribution | Simulating Data | Approach 1: Minimal — Just the Hazard Rate | Approach 2: Analytical Score + Analytical Hessian | Approach 3: Provide Score Only, Let numDeriv Handle the Hessian | Using Pre-Built Constructors | Computing Standard Errors | Distribution Reference | Next Steps
Dynamic Failure Rate Distributions5 months ago
Introduction | Why hazard-based parameterization? | Mathematical background | Getting Started | Using Built-in Distributions | Creating Custom Distributions | Distribution Methods | Hazard and cumulative hazard | Survival and CDF | PDF (Density) | Quantile function (inverse CDF) | Sampling | Overriding parameters | Likelihood Model Interface | Log-likelihood for survival data | Creating test data | Computing log-likelihood | Score function (gradient) | Hessian of log-likelihood | Maximum Likelihood Estimation | Working with censored data | Example: Weibull MLE | Custom Hazard Functions | Bathtub hazard | Time-covariate interaction | Integration with algebraic.dist | Model Diagnostics | Cox-Snell Residuals | Martingale Residuals | Summary | Next Steps
flexhaz: Hazard-First Survival Modeling5 months ago
The Problem | The Idea | Installation | Your First Distribution | Get Distribution Functions | Generate Samples | Fitting to Data | Maximum Likelihood Estimation | Model Diagnostics | Working with Censored Data | Right-Censoring | Left-Censoring | Custom Column Names | Beyond Exponential: Weibull | The Real Power: Custom Hazards | Define a bathtub hazard | Plot the hazard curve | Plot the survival curve | Simulate data and fit via MLE | Inspect the fit | Residual diagnostics | Built-in Distributions | Key Functions | Where to Go Next
Advanced Series System Composition5 months ago
Mixed Component Types | Hazard Decomposition | Nested Series Systems | Example: Subsystem Composition | Verifying Nested Hazard | Custom Components | Bathtub Curve Component | Effect on Cumulative Hazard | Failure Attribution | Attribution Proportions | Attribution by Time Window | Parameter Sensitivity
Series System Distributions: Overview5 months ago
The Problem | What Is a Series System? | Quick Start | Everything from flexhaz Works | Hazard and Survival | CDF and Density | Sampling | Log-Likelihood | Fitting (MLE) | System Introspection | Component Count and Extraction | Component Hazard Decomposition | Failure Attribution via Sampling | The Ecosystem | Where to Go Next
Gradient and Hessian Computation with nabla6 months ago
Helper: finite difference utilities | Normal log-likelihood: known sigma, unknown mu | Normal log-likelihood: unknown mu and sigma | Poisson log-likelihood: unknown lambda | Visualizing the gradient | Gamma log-likelihood: unknown shape, known rate | Logistic regression: 2 predictors | Newton-Raphson optimizer | Contour plot: Normal(mu, sigma) log-likelihood surface | Newton-Raphson convergence path | jacobian(): differentiating a vector-valued function | Summary
Higher-Order Derivatives6 months ago
The D operator | Curvature analysis | Visualizing curvature along sin(x) | Taylor expansion | Connection to MLE: exact Hessians for standard errors | How it works: nested duals | Summary
Higher-Order MLE Analysis6 months ago
Motivation | The Gamma model | Finding the MLE | Score and observed information | Third-order derivative tensor | Asymptotic skewness of the MLE | Monte Carlo validation | Visualizing MLE asymmetry | Summary
Introduction to nabla6 months ago
What is nabla? | Quick start | Works through any R code | Multi-parameter functions | Quick comparison: three ways to differentiate | Why exact derivatives matter | How it works: dual numbers | What's next?
Optimizer Integration6 months ago
Introduction | optim() with AD gradients | nlminb() with AD gradient + Hessian | Logistic regression example | Standard errors from the Hessian | Convergence comparison | Summary
Architecture of an AD Engine6 months ago
Introduction | Tier 0: Graph-per-Call (femtograd today) | What happens under the hood | The cost profile | Why this is the right choice for pedagogy | Tier 1: Tape-Based Tracing | The idea | What this buys you | The trade-off | Tier 2: Compiled Backends | C++ via Rcpp | GPU acceleration | The abstraction boundary | Where femtograd Chooses to Live | Summary
Getting Started with femtograd6 months ago
Introduction | Creating Differentiable Values | Building Computations | Computing Gradients | Resetting Gradients | Maximum Likelihood Estimation | Using Base R Generics | Built-in Distributions | Example: Exponential Distribution | Parameter Constraints | Model Comparison | Next Steps
How Automatic Differentiation Works6 months ago
Why Automatic Differentiation? | The Computational Graph | The Forward Pass | Reverse-Mode AD (Backpropagation) | Step by Step | Gradient Accumulation | Why Reverse Mode? | Second Derivatives: Forward-over-Reverse | Dual Numbers | Connection to Statistics | Fisher Information and Standard Errors | Newton-Raphson Optimization | Summary
Statistical Inference with femtograd6 months ago
Overview | Running Example | Wald Inference | Standard Errors | Confidence Intervals | Wald Test | Likelihood Ratio Tests | Model Comparison | Profile Likelihood | Bootstrap Inference | Model Diagnostics | What Can Go Wrong | Inference Summary
Survival Analysis from Scratch6 months ago
Introduction | Parametric Survival: The Weibull Model | Fitting Without Censoring | Handling Right Censoring | Simulating Censored Data | Fitting the Censored Model | Testing Shape = 1 (Is Exponential Adequate?) | Adding Covariates: Accelerated Failure Time Model | Interpreting the Treatment Effect | Is Treatment Significant? | Summary
Case Studies: MLE for Common Distributions7 months ago
Introduction | Case Study 1: Exponential Distribution | Case Study 2: Gamma Distribution | Composing Solvers: Grid Search + Gradient Ascent | Case Study 3: Beta Distribution | Case Study 4: Weibull Distribution | Case Study 5: Mixture of Normals | Summary
algebraic.dist: Examples8 months ago
Introduction | Defining the data generating process | Working with edist Objects | Creating edist Objects | Printing edist Objects | Mean and Variance of edist Objects | Sampling from edist Objects