
Last chance! 50% off unlimited learning
Sale ends in
A special case product distribution where each independent distribution is the same Distribution class but not necessarily with the same parameters.
Returns an R6 object of class ArrayDistribution.
ArrayDistribution$new(distribution, paramList, name = NULL, short_name = NULL, description = NULL)
Argument | Type | Details |
distribution |
distribution | Distribution to wrap. |
paramList |
list | List of parameters, see example. |
name |
list | Optional new name for distribution. |
short_name |
list | Optional new short_name for distribution. |
description |
list | Optional new description for distribution. |
Variable | Return |
name |
Name of distribution. |
short_name |
Id of distribution. |
description |
Brief description of distribution. |
Accessor Methods | Link |
wrappedModels(model = NULL) |
wrappedModels |
decorators() |
decorators |
traits() |
traits |
valueSupport() |
valueSupport |
variateForm() |
variateForm |
type() |
type |
properties() |
properties |
support() |
support |
symmetry() |
symmetry |
sup() |
sup |
inf() |
inf |
dmax() |
dmax |
dmin() |
dmin |
skewnessType() |
skewnessType |
kurtosisType() |
kurtosisType |
d/p/q/r Methods | Link |
pdf(x1, ..., log = FALSE, simplify = TRUE) |
pdf |
cdf(x1, ..., lower.tail = TRUE, log.p = FALSE, simplify = TRUE) |
cdf |
quantile(p, ..., lower.tail = TRUE, log.p = FALSE, simplify = TRUE) |
quantile.Distribution |
rand(n, simplify = TRUE) |
rand |
Statistical Methods | Link |
prec() |
prec |
stdev() |
stdev |
median() |
median.Distribution |
iqr() |
iqr |
cor() |
cor |
Parameter Methods | Link |
parameters(id) |
parameters |
getParameterValue(id, error = "warn") |
getParameterValue |
setParameterValue(..., lst = NULL, error = "warn") |
setParameterValue |
Validation Methods | Link |
liesInSupport(x, all = TRUE, bound = FALSE) |
liesInSupport |
liesInType(x, all = TRUE, bound = FALSE) |
liesInType |
Representation Methods | Link |
strprint(n = 2) |
strprint |
print(n = 2) |
print |
summary(full = T) |
summary.Distribution |
Exploits the following relationships of independent distributions
# NOT RUN {
a = ArrayDistribution$new(Binomial,
list(list(prob = 0.1, size = 2),
list(prob = 0.6, size = 4),
list(prob = 0.2, size = 6)))
a$pdf(x1=1,x2=2,x3=3)
a$cdf(x1=1,x2=2,x3=3)
a$rand(10)
# }
Run the code above in your browser using DataLab