Abstract class that cannot be constructed directly.
Returns error. Abstract classes cannot be constructed directly.
distr6::Distribution
-> DistributionWrapper
new()
Creates a new instance of this R6 class.
DistributionWrapper$new( distlist = NULL, name, short_name, description, support, type, valueSupport, variateForm, parameters = NULL, outerID = NULL )
distlist
(list())
List of Distributions.
name
(character(1))
Wrapped distribution name.
short_name
(character(1))
Wrapped distribution ID.
description
(character())
Wrapped distribution description.
support
([set6::Set])
Wrapped distribution support.
type
([set6::Set])
Wrapped distribution type.
valueSupport
(character(1))
Wrapped distribution value support.
variateForm
(character(1))
Wrapped distribution variate form.
parameters
([ParameterSetCollection])
Optional parameters to add to the internal collection, ignored if distlist
is given.
outerID
([ParameterSet])
Parameters added by the wrapper.
wrappedModels()
Returns model(s) wrapped by this wrapper.
DistributionWrapper$wrappedModels(model = NULL)
model
(character(1))
id of wrapped Distributions to return. If NULL
(default), a list of all wrapped
Distributions is returned; if only one Distribution is matched then this is returned,
otherwise a list of Distributions.
setParameterValue()
Sets the value(s) of the given parameter(s).
DistributionWrapper$setParameterValue( ..., lst = NULL, error = "warn", resolveConflicts = FALSE )
...
ANY
Named arguments of parameters to set values for. See examples.
lst
(list(1))
Alternative argument for passing parameters. List names should be parameter names and list values
are the new values to set.
error
(character(1))
If "warn"
then returns a warning on error, otherwise breaks if "stop"
.
resolveConflicts
(logical(1))
If FALSE
(default) throws error if conflicting parameterisations are provided, otherwise
automatically resolves them by removing all conflicting parameters.
clone()
The objects of this class are cloneable with this method.
DistributionWrapper$clone(deep = FALSE)
deep
Whether to make a deep clone.
Wrappers in distr6 use the composite pattern (Gamma et al. 1994), so that a wrapped distribution has the same methods and fields as an unwrapped one. After wrapping, the parameters of a distribution are prefixed with the distribution name to ensure uniqueness of parameter IDs.
Use listWrappers function to see constructable wrappers.
Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. 1994. <U+201C>Design Patterns: Elements of Reusable Object-Oriented Software.<U+201D> Addison-Wesley.
Other wrappers:
Convolution
,
HuberizedDistribution
,
MixtureDistribution
,
ProductDistribution
,
TruncatedDistribution
,
VectorDistribution