{
  "_id": "6a12c562acfb0bcc41d1f83f",
  "Package": "flexhaz",
  "Title": "Dynamic Failure Rate Distributions for Survival Analysis",
  "Version": "0.5.2",
  "Authors@R": "person(\"Alexander\", \"Towell\", , \"queelius@gmail.com\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0001-6443-9897\"))",
  "Description": "Flexible framework for specifying survival distributions\nthrough their hazard (failure rate) functions. Define arbitrary\ntime-varying hazard functions to model complex failure patterns\nincluding bathtub curves, proportional hazards with covariates,\nand other non-standard hazard behaviors. Provides automatic\ncomputation of survival, CDF, PDF, quantiles, and sampling.\nImplements the likelihood model interface for maximum\nlikelihood estimation with right-censored and left-censored\nsurvival data.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/testthat/edition": "3",
  "VignetteBuilder": "knitr",
  "URL": "https://github.com/queelius/flexhaz,\nhttps://queelius.github.io/flexhaz/",
  "BugReports": "https://github.com/queelius/flexhaz/issues",
  "Repository": "https://queelius.r-universe.dev",
  "Date/Publication": "2026-05-18 05:28:42 UTC",
  "RemoteUrl": "https://github.com/queelius/flexhaz",
  "RemoteRef": "HEAD",
  "RemoteSha": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-24 09:28:34 UTC",
    "User": "root"
  },
  "Author": "Alexander Towell [aut, cre] (ORCID:\n<https://orcid.org/0000-0001-6443-9897>)",
  "Maintainer": "Alexander Towell <queelius@gmail.com>",
  "MD5sum": "bf99ad8369a063509d6d3aed91c494b5",
  "_user": "queelius",
  "_type": "src",
  "_file": "flexhaz_0.5.2.tar.gz",
  "_fileid": "369fb3cb8024cf51d7b5dbf3bc539fab91c4f7d0b81a451794ccf3d2a42895ef",
  "_filesize": 1124496,
  "_sha256": "369fb3cb8024cf51d7b5dbf3bc539fab91c4f7d0b81a451794ccf3d2a42895ef",
  "_created": "2026-05-24T09:28:34.000Z",
  "_published": "2026-05-24T09:31:14.396Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77587060852,
      "time": 129,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7184039988"
    },
    {
      "job": 77587060845,
      "time": 110,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7184037904"
    },
    {
      "job": 77587060840,
      "time": 76,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7184034409"
    },
    {
      "job": 77587060844,
      "time": 80,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7184034886"
    },
    {
      "job": 77586915218,
      "time": 160,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7184026811"
    },
    {
      "job": 77587060843,
      "time": 100,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7184036970"
    },
    {
      "job": 77587060849,
      "time": 92,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7184035990"
    },
    {
      "job": 77587060857,
      "time": 97,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7184036489"
    },
    {
      "job": 77587060846,
      "time": 85,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7184035247"
    }
  ],
  "_buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/queelius/flexhaz",
  "_commit": {
    "id": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
    "author": "Alex Towell <lex@metafunctor.com>",
    "committer": "Alex Towell <lex@metafunctor.com>",
    "message": "v0.5.2 CRAN prep: refresh cran-comments and tighten .gitignore\n\n* cran-comments.md: update for v0.5.2 (the additive prototype-subclass\n  patch), note coordinated submission with serieshaz 0.2.0 and\n  maskedcauses 0.10.0.\n* .gitignore: add *.tar.gz, *.Rcheck/, CRAN-SUBMISSION, paper.pdf,\n  README.html so transient artifacts don't get tracked.\n",
    "time": 1779082122
  },
  "_maintainer": {
    "name": "Alexander Towell",
    "email": "queelius@gmail.com",
    "login": "queelius",
    "orcid": "0000-0001-6443-9897",
    "twitter": "@queelius",
    "description": "Alexander Towell (Alex Towell). Reliability theory, encrypted search, algebraic structures. Building personal data tools.",
    "uuid": 1896674
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "numDeriv",
      "role": "Imports"
    },
    {
      "package": "algebraic.dist",
      "role": "Imports"
    },
    {
      "package": "likelihood.model",
      "role": "Imports"
    },
    {
      "package": "generics",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "queelius",
  "_selfowned": true,
  "_usedby": 3,
  "_updates": [
    {
      "week": "2025-49",
      "n": 2
    },
    {
      "week": "2026-06",
      "n": 5
    },
    {
      "week": "2026-07",
      "n": 6
    },
    {
      "week": "2026-08",
      "n": 1
    },
    {
      "week": "2026-09",
      "n": 4
    },
    {
      "week": "2026-10",
      "n": 1
    },
    {
      "week": "2026-12",
      "n": 2
    },
    {
      "week": "2026-20",
      "n": 1
    },
    {
      "week": "2026-21",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "v0.1.0",
      "date": "2025-12-04"
    },
    {
      "name": "v0.2.0",
      "date": "2025-12-06"
    },
    {
      "name": "v0.5.0",
      "date": "2026-02-13"
    },
    {
      "name": "v0.5.1",
      "date": "2026-02-24"
    }
  ],
  "_topics": [
    "automatic-differentiation",
    "censored-data",
    "failure-rate",
    "hazard-function",
    "likelihood-functions",
    "mle",
    "reliability",
    "statistical-inference",
    "survival-analysis"
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "queelius",
      "count": 37,
      "uuid": 1896674
    }
  ],
  "_userbio": {
    "uuid": 1896674,
    "type": "user",
    "name": "Alex Towell",
    "description": "Alexander Towell (Alex Towell). Reliability theory, encrypted search, algebraic structures. Building personal data tools."
  },
  "_downloads": {
    "count": 517,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/flexhaz"
  },
  "_devurl": "https://github.com/queelius/flexhaz",
  "_pkgdown": "https://queelius.github.io/flexhaz/",
  "_searchresults": 39,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/flexhaz.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/queelius/flexhaz",
  "_realowner": "queelius",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.5.0",
      "date": "2026-03-02"
    },
    {
      "version": "0.5.1",
      "date": "2026-03-19"
    },
    {
      "version": "0.5.2",
      "date": "2026-05-23"
    }
  ],
  "_exports": [
    "assumptions",
    "cdf",
    "cum_haz",
    "dfr_dist",
    "dfr_exponential",
    "dfr_gompertz",
    "dfr_loglogistic",
    "dfr_weibull",
    "fit",
    "hazard",
    "hess_loglik",
    "inv_cdf",
    "is_dfr_dist",
    "is_likelihood_model",
    "loglik",
    "params",
    "qqplot_residuals",
    "sampler",
    "score",
    "sup",
    "surv"
  ],
  "_help": [
    {
      "page": "assumptions.dfr_dist",
      "title": "Retrieve the assumptions a DFR distribution makes about the data",
      "topics": [
        "assumptions.dfr_dist"
      ]
    },
    {
      "page": "cdf.dfr_dist",
      "title": "Method for obtaining the cdf of a 'dfr_dist' object.",
      "topics": [
        "cdf.dfr_dist"
      ]
    },
    {
      "page": "cum_haz",
      "title": "Method for obtaining the cumulative hazard function of an object.",
      "topics": [
        "cum_haz"
      ]
    },
    {
      "page": "cum_haz.dfr_dist",
      "title": "Method for obtaining the cumulative hazard function of a 'dfr_dist' object.",
      "topics": [
        "cum_haz.dfr_dist"
      ]
    },
    {
      "page": "density.dfr_dist",
      "title": "Method for obtaining the density (pdf) of a 'dfr_dist' object.",
      "topics": [
        "density.dfr_dist"
      ]
    },
    {
      "page": "dfr_dist",
      "title": "Constructor for 'dfr_dist' objects",
      "topics": [
        "dfr_dist"
      ]
    },
    {
      "page": "dfr_exponential",
      "title": "Exponential Distribution (Constant Hazard)",
      "topics": [
        "dfr_exponential"
      ]
    },
    {
      "page": "dfr_gompertz",
      "title": "Gompertz Distribution (Exponential Growth Hazard)",
      "topics": [
        "dfr_gompertz"
      ]
    },
    {
      "page": "dfr_loglogistic",
      "title": "Log-Logistic Distribution (Non-Monotonic Hazard)",
      "topics": [
        "dfr_loglogistic"
      ]
    },
    {
      "page": "dfr_weibull",
      "title": "Weibull Distribution (Power-Law Hazard)",
      "topics": [
        "dfr_weibull"
      ]
    },
    {
      "page": "diagnostics",
      "title": "Diagnostic Methods for DFR Distributions",
      "concept": [
        "dfr_dist"
      ],
      "topics": [
        "diagnostics"
      ]
    },
    {
      "page": "distributions",
      "title": "Classic Survival Distribution Constructors",
      "concept": [
        "distributions"
      ],
      "topics": [
        "distributions"
      ]
    },
    {
      "page": "fit.dfr_dist",
      "title": "MLE solver for dfr_dist objects",
      "topics": [
        "fit.dfr_dist"
      ]
    },
    {
      "page": "hazard.dfr_dist",
      "title": "Method for obtaining the hazard function of a 'dfr_dist' object.",
      "topics": [
        "hazard.dfr_dist"
      ]
    },
    {
      "page": "hess_loglik.dfr_dist",
      "title": "Hessian of log-likelihood for dfr_dist",
      "topics": [
        "hess_loglik.dfr_dist"
      ]
    },
    {
      "page": "inv_cdf.dfr_dist",
      "title": "Method for obtaining the quantile (inverse cdf) of an object.",
      "topics": [
        "inv_cdf.dfr_dist"
      ]
    },
    {
      "page": "is_dfr_dist",
      "title": "Function for determining whether an object is a 'dfr_dist' object.",
      "topics": [
        "is_dfr_dist"
      ]
    },
    {
      "page": "loglik.dfr_dist",
      "title": "Log-likelihood method for 'dfr_dist' objects",
      "topics": [
        "loglik.dfr_dist"
      ]
    },
    {
      "page": "params.dfr_dist",
      "title": "Method for obtaining the parameters of a 'dfr_dist' object.",
      "topics": [
        "params.dfr_dist"
      ]
    },
    {
      "page": "plot.dfr_dist",
      "title": "Plot DFR Distribution Functions",
      "topics": [
        "plot.dfr_dist"
      ]
    },
    {
      "page": "print.dfr_dist",
      "title": "Print method for 'dfr_dist' objects.",
      "topics": [
        "print.dfr_dist"
      ]
    },
    {
      "page": "qqplot_residuals",
      "title": "Q-Q Plot for Cox-Snell Residuals",
      "topics": [
        "qqplot_residuals"
      ]
    },
    {
      "page": "residuals.dfr_dist",
      "title": "Residuals for DFR Distribution Fits",
      "topics": [
        "residuals.dfr_dist"
      ]
    },
    {
      "page": "sampler.dfr_dist",
      "title": "Sampling function for 'dfr_dist' objects.",
      "topics": [
        "sampler.dfr_dist"
      ]
    },
    {
      "page": "score.dfr_dist",
      "title": "Score function (gradient of log-likelihood) for dfr_dist",
      "topics": [
        "score.dfr_dist"
      ]
    },
    {
      "page": "sup.dfr_dist",
      "title": "Method for retrieving the support of an object 'x'.",
      "topics": [
        "sup.dfr_dist"
      ]
    },
    {
      "page": "surv.dfr_dist",
      "title": "Method for obtaining the survival function of a 'dfr_dist' object.",
      "topics": [
        "surv.dfr_dist"
      ]
    }
  ],
  "_readme": "https://github.com/queelius/flexhaz/raw/HEAD/README.md",
  "_rundeps": [
    "algebraic.dist",
    "algebraic.mle",
    "boot",
    "generics",
    "likelihood.model",
    "MASS",
    "mvtnorm",
    "numDeriv",
    "R6"
  ],
  "_vignettes": [
    {
      "source": "custom_distributions.Rmd",
      "filename": "custom_distributions.html",
      "title": "Creating Custom Distributions",
      "engine": "knitr::rmarkdown",
      "headings": [
        "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"
      ],
      "created": "2026-02-02 07:04:50",
      "modified": "2026-02-18 22:02:52",
      "commits": 5
    },
    {
      "source": "custom_derivatives.Rmd",
      "filename": "custom_derivatives.html",
      "title": "Custom Derivatives for Maximum Likelihood Estimation",
      "engine": "knitr::rmarkdown",
      "headings": [
        "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"
      ],
      "created": "2026-02-13 09:46:50",
      "modified": "2026-02-18 22:02:52",
      "commits": 4
    },
    {
      "source": "failure_rate.Rmd",
      "filename": "failure_rate.html",
      "title": "Dynamic Failure Rate Distributions",
      "engine": "knitr::rmarkdown",
      "headings": [
        "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"
      ],
      "created": "2023-06-16 10:09:24",
      "modified": "2026-02-18 22:02:52",
      "commits": 11
    },
    {
      "source": "flexhaz-package.Rmd",
      "filename": "flexhaz-package.html",
      "title": "flexhaz: Hazard-First Survival Modeling",
      "engine": "knitr::rmarkdown",
      "headings": [
        "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"
      ],
      "created": "2026-02-14 18:27:23",
      "modified": "2026-02-18 22:02:52",
      "commits": 2
    },
    {
      "source": "reliability_engineering.Rmd",
      "filename": "reliability_engineering.html",
      "title": "Reliability Engineering Applications",
      "engine": "knitr::rmarkdown",
      "headings": [
        "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"
      ],
      "created": "2026-02-02 07:04:50",
      "modified": "2026-02-24 06:42:45",
      "commits": 5
    }
  ],
  "_score": 6.897489634577187,
  "_indexed": true,
  "_nocasepkg": "flexhaz",
  "_universes": [
    "queelius"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.5.2",
      "date": "2026-05-24T09:30:33.000Z",
      "distro": "noble",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "e5420e0b311330996058fa69b534685625465894e0def88b1417450481bedcc9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.5.2",
      "date": "2026-05-24T09:30:20.000Z",
      "distro": "noble",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "d1745bae2d8563e08e27f2a96ada4e03d03c58e43c5ae38e12b9693ab813724a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.5.2",
      "date": "2026-05-24T09:29:52.000Z",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "944d997a1c5a11310f6b2f2f584e2d4dd3b9f182cb4305bb8566a61711381d8c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.5.2",
      "date": "2026-05-24T09:29:54.000Z",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "9e199127a1218257d086cf4921e6b6cfaa1cfb201d076baa83e7fe8d67f4d80f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.5.2",
      "date": "2026-05-24T09:30:28.000Z",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "602d3d06ae36017f3061d9871a8df0bc6349e95c0868355a2635fa6734f495c8",
      "status": "success",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.5.2",
      "date": "2026-05-24T09:29:49.000Z",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "ccfd428e282e7bda858ef7cbaa31ba5fa8b085d28a4290208d7ae730be4d8c7b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.5.2",
      "date": "2026-05-24T09:29:55.000Z",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "1ac8f9613bf1d3625517be75a6d59142eac18cb232033426011927d7e721069d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.5.2",
      "date": "2026-05-24T09:29:42.000Z",
      "commit": "2cde3faff8e6e8cb56b11276c50b7be95ca66ac7",
      "fileid": "b6c941a3b9886bce8ef93a77888ff9e921331e723d447241b9c7740cbfc7ac20",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/queelius/actions/runs/26357526901"
    }
  ]
}