Package: distfromq 1.0.4

distfromq: Reconstruct a Distribution from a Collection of Quantiles

Given a set of predictive quantiles from a distribution, estimate the distribution and create `d`, `p`, `q`, and `r` functions to evaluate its density function, distribution function, and quantile function, and generate random samples. On the interior of the provided quantiles, an interpolation method such as a monotonic cubic spline is used; the tails are approximated by a location-scale family.

Authors:Evan Ray [aut, cre], Aaron Gerding [aut], Li Shandross [ctb], Nick Reich [ctb]

distfromq_1.0.4.tar.gz
distfromq_1.0.4.zip(r-4.5)distfromq_1.0.4.zip(r-4.4)distfromq_1.0.4.zip(r-4.3)
distfromq_1.0.4.tgz(r-4.4-any)distfromq_1.0.4.tgz(r-4.3-any)
distfromq_1.0.4.tar.gz(r-4.5-noble)distfromq_1.0.4.tar.gz(r-4.4-noble)
distfromq_1.0.4.tgz(r-4.4-emscripten)distfromq_1.0.4.tgz(r-4.3-emscripten)
distfromq.pdf |distfromq.html
distfromq/json (API)
NEWS

# Install 'distfromq' in R:
install.packages('distfromq', repos = c('https://elray1.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

7 exports 0.82 score 10 dependencies 2 dependents 32 scripts

Last updated 5 days agofrom:1c091a6739. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 14 2024
R-4.5-winOKSep 14 2024
R-4.5-linuxOKSep 14 2024
R-4.4-winOKSep 14 2024
R-4.4-macOKSep 14 2024
R-4.3-winOKSep 14 2024
R-4.3-macOKSep 14 2024

Exports:duplicated_tolmake_d_fnmake_p_fnmake_q_fnmake_r_fnsplit_disc_cont_ps_qsunique_tol

Dependencies:backportscheckmatecligluelifecyclemagrittrpurrrrlangvctrszeallot

distfromq

Rendered fromdistfromq.Rmdusingknitr::rmarkdownon Sep 14 2024.

Last update: 2024-09-14
Started: 2024-09-14

Readme and manuals

Help Manual

Help pageTopics
Identify duplicated values in a sorted numeric vector, where comparison is up to a specified numeric tolerance. If there is a run of values where each consecutive pair is closer together than the tolerance, all are labeled as duplicates even if not all values in the run are within the tolerance.duplicated_tol
Get indices of starts and ends of runs of duplicate valuesget_dup_run_inds
Creates a function that evaluates the probability density function of an approximation to a distribution obtained by interpolating and extrapolating from a set of quantiles of the distribution.make_d_fn
Creates a function that evaluates the cumulative distribution function of an approximation to a distribution obtained by interpolating and extrapolating from a set of quantiles of the distribution.make_p_fn
Creates a function that evaluates the quantile function of an approximation to a distribution obtained by interpolating and extrapolating from a set of quantiles of the distribution.make_q_fn
Creates a function that generates random deviates from an approximation to a distribution obtained by interpolating and extrapolating from a set of quantiles of the distribution.make_r_fn
Create a polySpline object representing a monotonic Hermite spline interpolating a given set of points.mono_Hermite_spline
Approximate density function, CDF, or quantile function on the interior of provided quantiles by representing the distribution as a sum of a discrete part at any duplicated 'qs' and a continuous part for which the CDF is estimated using a monotonic Hermite spline. See details for more.spline_cdf
Split ps and qs into those corresponding to discrete and continuous parts of a distribution.split_disc_cont_ps_qs
A factory that returns a function that performs linear interpolation, allowing for "steps" or discontinuities.step_interp_factory
Get unique values in a sorted numeric vector, where comparison is up to a specified numeric tolerance. If there is a run of values where each consecutive pair is closer together than the tolerance, all are labeled as corresponding to a single unique value even if not all values in the run are within the tolerance.unique_tol