nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches

Distribution fitters (*fit) and negative-log-likelihood scoring (*like). More...

#include <memory_resource>
#include <nk/value/value.hpp>
#include <tuple>

Go to the source code of this file.

Functions

std::tuple< Value, Value, Value, Value > nk::stats::normfit (const Value &x, double alpha, std::pmr::memory_resource *mr=nullptr)
 Normal MLE without censoring ([muhat, sigmahat, muci, sigmaci] = normfit(x, alpha)).
std::tuple< Value, Value, Value, Value > nk::stats::normfit (const Value &x, double alpha, const Value &cens, const Value &freq, std::pmr::memory_resource *mr=nullptr)
 Normal MLE with optional censoring and frequencies.
std::tuple< Value, Value > nk::stats::poissfit (const Value &x, double alpha, std::pmr::memory_resource *mr=nullptr)
 Poisson MLE ([lhat, lci] = poissfit(x, alpha)).
std::tuple< Value, Value > nk::stats::expfit (const Value &x, double alpha, const Value &cens=Value::Empty, const Value &freq=Value::Empty, std::pmr::memory_resource *mr=nullptr)
 Exponential MLE ([muhat, muci] = expfit(x, alpha, cens, freq)).
std::tuple< Value, Value, Value, Value > nk::stats::unifit (const Value &x, double alpha, std::pmr::memory_resource *mr=nullptr)
 Continuous-uniform MLE ([ahat, bhat, aci, bci] = unifit(x, alpha)).
std::tuple< Value, Value > nk::stats::lognfit (const Value &x, double alpha, std::pmr::memory_resource *mr=nullptr)
 Lognormal MLE without censoring ([parm, pci] = lognfit(x, alpha)).
std::tuple< Value, Value > nk::stats::lognfit (const Value &x, double alpha, const Value &cens, const Value &freq, std::pmr::memory_resource *mr=nullptr)
 Lognormal MLE with censoring and frequencies.
std::tuple< Value, Value > nk::stats::binofit (const Value &x, const Value &n, double alpha, std::pmr::memory_resource *mr=nullptr)
 Binomial parameter CI ([phat, pci] = binofit(x, n, alpha)).
std::tuple< Value, Value > nk::stats::raylfit (const Value &x, double alpha, std::pmr::memory_resource *mr=nullptr)
 Rayleigh MLE ([shat, sci] = raylfit(x, alpha)).
double nk::stats::normlike (double mu, double sigma, const Value &x, const Value &cens, const Value &freq, std::pmr::memory_resource *mr=nullptr)
 Normal negative-log-likelihood (nLogL = normlike(mu, sigma, x, cens, freq)).
double nk::stats::explike (double mu, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Exponential nLogL (nLogL = explike(mu, x)).
double nk::stats::lognlike (double mu, double sigma, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Lognormal nLogL (nLogL = lognlike(mu, sigma, x)).
double nk::stats::gamlike (double a, double b, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Gamma nLogL (nLogL = gamlike(a, b, x)).
double nk::stats::betalike (double a, double b, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Beta nLogL (nLogL = betalike(a, b, x)).
double nk::stats::wbllike (double a, double b, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Weibull nLogL (nLogL = wbllike(a, b, x)).
double nk::stats::evlike (double mu, double sigma, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Type-I EV nLogL (nLogL = evlike(mu, sigma, x)).
double nk::stats::gevlike (double k, double sigma, double mu, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Generalised Extreme Value nLogL (nLogL = gevlike(k, sigma, mu, x)).
double nk::stats::gplike (double k, double sigma, const Value &x, std::pmr::memory_resource *mr=nullptr)
 Generalised Pareto nLogL (nLogL = gplike(k, sigma, x), theta = 0).

Detailed Description

Distribution fitters (*fit) and negative-log-likelihood scoring (*like).

Each fitter returns scalar (or per-element) parameter estimates plus 1 × 2 confidence intervals at level 1 - alpha. Default alpha = 0.05 (95% CI).

Definition in file fit.hpp.