Statistical Methods
pdf(x1, ..., log = FALSE, simplify = TRUE) pdf cdf(x1, ..., lower.tail = TRUE, log.p = FALSE, simplify = TRUE) cdfquantile(p, ..., lower.tail = TRUE, log.p = FALSE, simplify = TRUE) quantile.Distribution rand(n, simplify = TRUE) rand mean() mean.Distribution variance() variance stdev() stdev prec() prec cor() cor skewness() skewness kurtosis(excess = TRUE) kurtosis entropy(base = 2) entropy mgf(t) mgf cf(t) cf pgf(z) pgf median() median.Distribution iqr() iqr mode(which = "all") mode
Parameter Methods
parameters(id) parameters getParameterValue(id, error = "warn") getParameterValue setParameterValue(..., lst = NULL, error = "warn") setParameterValue
Validation Methods
liesInSupport(x, all = TRUE, bound = FALSE) liesInSupport liesInType(x, all = TRUE, bound = FALSE) liesInType
Representation Methods
strprint(n = 2) strprint print(n = 2) print summary(full = T) summary.Distribution # NOT RUN {
# Note probabilities are automatically normalised
x = Categorical$new("Bapple","Banana",2,probs=c(0.2,0.4,1))
# Only the probabilities can be changed and must the same length as in construction
x$setParameterValue(probs = c(0.1,0.2,0.7))
# d/p/q/r
x$pdf(c("Bapple", "Carrot", 1, 2))
x$cdf("Banana") # Assumes ordered in construction
x$quantile(0.42) # Assumes ordered in construction
x$rand(10)
# Statistics
x$mode()
summary(x)
# }
Run the code above in your browser using DataLab