NEWS.md
pdfcdf
and cdfpdf
, which use Rcpp to transform matrics/arrays/vectors between pdf->cdf and cdf->pdf respectively.Arrdist
, which generalises the Matdist
to a three-dimensional array, useful for Bayesian predictions where the third dimension is multiple distributions.dparse()
rep
Matdist
to simplify the process of creating a vector distribution for WeightedDiscrete
distributions. Matdist
acts as a univariate distribution whilst technically being multivariate - it contains a matrix of probabilities and provides methods for acting on those.plot.Matdist
to wrap matplot
around Matdist
, c.Matdist
to combine multiple matrix distributions into one, [.Matdist
for extracting WeightedDiscrete
or Matdist
distributions from Matdist
, and as.Distribution
.mixMatrix
as a specialised mixing method for Matdist
that creates a new Matdist
instead of a MixtureDistribution
as.Distribution.matrix
to now coerce to a Matdist
, a vector of WeightedDisrete
is still possible.cdf
parameter must be increasingconfidence
to calculate confidence intervalsprint
method now only shows active parametersas.Distribution.matrix
for converting matrices to a VectorDistribution
of WeightedDiscrete
distributions...
to dstrs
to allow decorator argument to be passed throughlength.VectorDistribution
ids
parameter to VectorDistribution
to allow specifying names for wrapped distributions. Extended extract.VectorDistribution
so these ids can be used for extraction.dstr
to construct distributions more easily, e.g. dstr("Binom", size = 4)
instead of Binomial$new(size = 4)
.dstrs
to construct a VectorDistribution
of distributions.ParameterSet
method setParameterValue
now includes resolveConflicts
parameter for resolving conflicts between conflicting parameters (see below). This should primarily only be used internally and is useful for transforming composite distributions.__
(before _
). This may affect backwards compatibility in rare cases.Binomial$new(prob = 0.1, qprob = 0.2)
would cause an error. This may affect bacwards compatibility however should not do so if distributions are correctly constructed/updated without conflicts.setParameterValue
in ParameterSet
no longer errors if a non-settable parameter is updated, instead a warning
is given and the parameter is ignored.SDistribution
parameter defaults are set. Previously these were set in the constructor with function defaults, now they are set in the ParameterSet
. This should not affect backwards compatibility. This should improve speed of distribution construction.MixtureDistribution
now uses extraDistr::rmnom
for speed improvements.ParameterSet
but these will be improved further in a future update.SDistribution
ParameterSet
objects.rep.Distribution
for replicating distributions into vectors, mixtures, or productscdfSquared2Norm
analytic methods to most kernelsas.MixtureDistribution
and as.ProductDistribution
MixtureDistribution
parameter setWeightedDiscrete
distributions are now truncated at the minimum length in the vector for pdf, cdf, quantile
CoreStatistics
methods now give the option to use cubature::cubintegrate
and all associated parameters.{pracma}
requirement in ExoticStatistics
WeightedDiscrete
, cdf
was previously positive when below distribution support, now zero.ExoticStatistics
decoratorsuppressMoments
argument in Distribution
and computation of movements in constructor, improving construction speeds.kurtosis
and skewness
type no longer included in properties. The kurtosis and skewness methods are still available as public methods, and the types are still in summary; to manually find these use exkurtosisType
and skewType
.ParameterSet
now allowedworkingSupport
is now a public method and not an active bindingVectorDistribution
now return arraysmedian
now available for SDistribution
s where closed form expressions are knownRcpp
with analytical log-pdf expressions. Analytical lower.tail and log.p will come in future versions.EmpiricalMV
for empirical multivariate distributionstype
is now required in construction custom Distribution
s as the previous method of ‘guessing’ was inefficient.ParameterSetCollection
for Wrapper
s. Same functionality as before but much more efficient.$addDeps
and $deps
to ParameterSet
s to replace updateFunc
. This allows faster and more precise control over parameter updates.$addChecks
and $checks
to ParameterSet
s to replace custom checks in distributions, and $addTrafos
and $trafos
to replace custom parameter transformations before setting. These allows clearner control over parameter setting.categories
parameter in Categorical
now called nCategories
Categorical
now requires elements to be provided as a list
to elements
settable
in ParameterSet
now refers to the more intuitive flag that describes if a parameter can be set after constructionlength
active binding to ParameterSet
to return number of parameters in the set.squared2Norm
in Kernel
s to pdfSquared2Norm
and added x
to arguments to allow for shifted norms.mixturiseVector
for mixing vector distributions$support, $symmetry, $kurtosisType, $skewnessType, $valueSupport, $variateForm, $type
Loglogistic
and ShiftedLoglogistic
so only the latter has a location
parameter. Additionally added an analytical rand
expression to ShiftedLoglogistic
, and Loglogistic
now implemented from package actuar
ArrayDistribution
listSpecialSets
WeighedDiscrete
distribution now stores samples and probabilities as parameters.verbose
argument from distribution constructorupdate
method in ParameterSet
moved to private
squared2Norm
from the ExoticStatistics
decoratorupdateFunc
from ParameterSet
.getRefParams
from SDistribution
s and added deps
decorate
function that was overwriting the decorators
private field instead of appendingSDistribution
and Kernel
$rand
for Geometric
distribution with trials == TRUE
, previously was randomising between $[1, Inf)$ not $[0, Inf)$form
parameter in NegativeBinomial
, now errors if supplied argument is not in one of the four choices (previously reverted to “fbs”)MultivariateNormal
rand()
which was not adding the mean
correctlyVectorDistribution
for same distribution type removed in d/p/q/r functions as well as non-generating function methodsVectorDistribution
when only one row or column of data passed to d/p/qDirichlet, DiscreteUniform, Frechet Gumbel, Pareto, Rayleigh, Triangular, Wald
now implemented from package extraDistr
Frechet
$cdf
log
and lower.tail
now available for all SDistributions
and imputation possible for customs with CoreStatistics
NegativeBinomial
now uses Rcpp for d/p/q/rstats
are now vectorised across parameters in CDegenerate
, ShiftedLoglogistic
now RcppK
parameter from MultivariateNormal
Wald
, symmetry was incorrectly flagged as “symmetric”TruncatedDistribution
support - previously support interval type was "[]"
instead of "(]"
. An important implication is that even if truncating at or outside of the distribution limits, the support will still be changed if the distribution was left-closed to become left-open.listDistributions
which was overriding filtering with simplify
decorate
function that was overwriting the decorators
private field instead of appendingplot.VectorDistribution
for more efficient plotting of mutiple distributions at the same timeMultivariateNormal$rand()
. i) the distribution mean wasn’t being added to the transformation correctly; ii) the Choleskey decomposition wasn’t transposed causing incorrect simulationsWeibull
, thanks to Paul Northrop (@paulnorthrop) for pointing this out.plot
preventing only quantile
being plotted on its owndecorators, traits, valueSupport, variateForm, type, properties, support, symmetry, sup, inf, dmax, dmin, kurtosisType, skewnessType
VectorDistribution
that was causing decorators not to be added properlyVectorDistribution
that was causing an error when extracting decorated wrapped distributionspracma
to suggests. Removed utils
dependency.package
field in distributions, now called packages
packages
lists all packages required to be installed for a distribution, if NULL
only distr6 requiredset6
packagelistSpecialSets
, use set6::listSpecialSets
insteadupdate
of ParameterSet
, any properly defined distributions will have this covered in primary parameter, thus increasing speed.as.data.table
has been moved from a ParameterSet
method to an S3 dispatch. Fixes an important bug of overloading as.data.table
but may affect backwards compatibility.distrSimulate
for convenient simulation from any distributionplot
to be able to handle distributions without quantile
or rand
. Optimised runtime by preventing automatic computation of pdf
and cdf
.VectorDistribution
- missing which
argumentBernoulli
- rand
was incorrectly calling dbinom
not rbinom
mode
of distributionsmode
to documentationc.Distribution
VectorDistribution
print
method more in line with base R vectorsplot
function for plotting the pdf, cdf, survival, quantile, hazard, cumhazard
or distr6
objectslines
function for superimposing distr6
plotsqqplot
function for comparing distr6
distributions to each other or to other theoretical distributionsExtract.VectorDistribution
for extracted distributions from inside a VectorDistribution
, see the big update below.decorate
now allows users to specify the Decorator as a character as well as supplying the object, this makes it simpler when using distr6 whilst unattachedVectorDistribution
. Now the VectorDistribution
only constructs the internal wrapped distributions when they are extracted or when a function, such as d/p/q/r, are called. This massively reduces a bottleneck in constructing the distribution. Additionally added functions for extracting distributions from inside the VectorDistribution
. The only difference that should affect backwards compatibility is that the distribution
argument must now be a character and not an object. Custom (i.e. non-SDistribution
) distributions should be used in conjunction with the distlist
initializer.skewness
, kurtosis
, entropy
, mgf
, cf
, and pgf
to WeightedDiscrete
and Empirical
VectorDistribution
and for CoreStatistics
functions as well as support for only one arguments passed to d/p/q/r for fast comparisons between wrapped distributionsWeightedDiscrete
distribution variance
calculationEmpirical
that was stopping the cdf of the first point in the distribution being evaluatedDistribution
constructor for wrapperserrormsg
argument to assertions so a custom error message can be providedEmpirical
that was causing results to be droppedTruncatedDistribution
that prevented multivariate distributions being truncatedEmpirical
that was calculating sample not populationEmpirical
distribution for distributions arising from observed samples (e.g. from MC sampling methods)simulateEmpiricalDistribution
: function for sampling without replacement from an Empirical
distributionArrayDistribution
- This wrapper is now merged with ProductDistribution
by adding two new parameters to ProductDistribution
that allow for construction either by a distribution list of by naming a distribution and providing a parameter list or data.tablecdf
of discrete distributions evaluated between integers are now evaluated after rounding down and do not return 0, e.g. Binomial$new()$cdf(1.8) == Binomial$new()$cdf(1)
ProductDistribution
: params
and distribution
, so that it can either function as before or as the ArrayDistribution
wrapper which is now deprecated.VectorDistribution
: params
and distribution
, so that it can either function as before or as a generalisation to the ArrayDistribution
wrapper which is now deprecated.ParameterSet
expected integer in setParameterValue
n
to strprint
and print
to clean the print method for distributions (especially wrappers) with multiple parametersvectordist
argument to MixtureDistribution
for better compatibility with VectorDistribution
short_name
of Uniform, Logistic, Normal, and Triangular kernels to remove Kern
. The ClassName
s (and thus constructors) remain the samelistKernels
and listSpecialSet
now return data.tables with stringsAsFactors = FALSE
Degenerate
distribution re-classified as discreterand
return of a Vector Distribution (transposed data.table and added column names)crayon
dependencyMixtureDistribution
that was causing rand
to erroneously return integersCategorical
documentationCategorical
distributionsummary
and print
now return self
invisibly for better pipingstopwarn
argument removed from parameters()
method in Distribution
and ParameterSet
classes