CRAN release: 2022-09-07
- New generics
is_continous()with methods for all distribution objects in the package. The
TRUEfor every distribution that is discrete on the entire support and
TRUEfor every distribution that is continuous on the entire support and
FALSEotherwise. Thus, for mixed discrete-continuous distributions both methods should yield
- New logical argument
elementwise = NULLin
apply_dpqr()and hence inherited in
quantile(). It provides type-safety when applying one of the functions to a vector of distributions
dto a numeric argument
xare of length n > 1. By setting
elementwise = TRUEthe function is applied element-by-element, also yielding a vector of length n. By setting
elementwise = FALSEthe function is applied for all combinations yielding an n-by-n matrix. The default
elementwise = NULLcorresponds to
xare of different lengths and
TRUEif the are of the same length n > 1 (#87).
- Extended support for various count data distributions, now enompassing both the Poisson and negative binomial distributions along with various adjustments for zero counts (hurdle, inflation, and truncation, respectively). More details are provided in the following items (#86).
ztpoissimilar to the corresponding
poisfunctions from base R.
ZTPoisson()distribution constructors along with the corresponding S3 methods for the “usual” generics (except
prodist()methods for extracting the fitted/predicted probability distributions from models estimated by
zerotrunc()objects from either the
psclpackage or the
- Added argument
prodist(..., sigma = "ML")to the
lmmethod for extracting the fitted/predicted probability distribution from a linear regression model. In the previous version the
prodist()method always used the least-squares estimate of the error variance (= residual sum of squares divided by the residual degrees of freedom, n - k), as also reported by the
summary()method. Now the default is to use the maximum-likelihood estimate instead (divided by the number of observations, n) which is consistent with the
logLik()method. The previous behavior can be obtained by specifying
sigma = "OLS"(#91).
- Similarly to the
prodist(..., dispersion = NULL)now, by default, uses the
dispersionestimate that matches the
logLik()output. This is based on the deviance divided by the number of observations, n. Alternatively,
dispersion = "Chisquared"uses the estimate employed in the
summary()method, based on the Chi-squared statistic divided by the residual degrees of freedom, n - k.
- Small improvements in methods for various distribution objects: Added
support()method for GEV-based distributions (
Frechet()). Added a
random()method for the
Tukey()distribution (using the inversion method).
CRAN release: 2022-06-21
- Vectorized univariate distribution objects by Moritz Lang and Achim Zeileis (#71 and #82). This allows representation of fitted probability distributions from regression models. New helper functions are provided to help setting up such distribution objects in a unified way. In particular,
apply_dpqr()helps to apply the standard
rfunctions available in base R and many packages. The accompanying manual page provides some worked examples and further guidance.
- New vignette (by Achim Zeileis) on using
distributions3to go from basic probability theory to probabilistic regression models. Illustrated with Poisson GLMs for the number of goals per team in the 2018 FIFA World Cup explained by the teams’ ability differences. (#74)
- New generic function
prodist()to extract fitted (in-sample) or predicted (out-of-sample) probability distributions from model objects like
- Extended support for count data distributions (by Achim Zeileis): Alternative parameterization for negative binomial distribution (commonly used in regression models), zero-inflated Poisson, and zero-hurdle Poisson. (#80 and #81)
CRAN release: 2022-01-03
- Added a plotting generic for univariate distributions (@paulnorthrop, PR #56)
- Added support for the Generalised Extreme Value (GEV), Frechet, Gumbel, reversed Weibull and Generalised Pareto (GP) distributions (@paulnorthrop, PR #52)
- Added support for the Erlang distribution (@ellessenne, PR #54)
- Various minor bug fixes