Last chance! 50% off unlimited learning
Sale ends in
The Beta mixture density and auxilary functions.
mixbeta(..., param = c("ab", "ms", "mn"))ms2beta(m, s, drop = TRUE)
mn2beta(m, n, drop = TRUE)
# S3 method for betaMix
print(x, ...)
# S3 method for betaBinomialMix
print(x, ...)
# S3 method for betaMix
summary(object, probs = c(0.025, 0.5, 0.975), ...)
# S3 method for betaBinomialMix
summary(object, probs = c(0.025, 0.5, 0.975), ...)
mixbeta
returns a beta mixture with the specified mixture components. ms2beta
and
mn2beta
return the equivalent natural a
and b
parametrization given parameters m
,
s
, or n
.
List of mixture components.
Determines how the parameters in the list are interpreted. See details.
Vector of means of beta mixture components.
Vector of standard deviations of beta mixture components.
Delete the dimensions of an array which have only one level.
Vector of number of observations.
The mixture to print
Beta mixture object.
Quantiles reported by the summary
function.
Each entry in the ...
argument list is expected to
be a triplet of numbers which defines the weight
The first and second parameter can be given in different
parametrizations which is set by the param
option:
Natural parametrization of Beta density (a
=shape1 and b
=shape2). Default.
Mean and standard deviation,
Mean and number of observations,
Other mixdist:
mix
,
mixcombine()
,
mixgamma()
,
mixmvnorm()
,
mixnorm()
,
mixplot
## a beta mixture
bm <- mixbeta(rob = c(0.2, 2, 10), inf = c(0.4, 10, 100), inf2 = c(0.4, 30, 80))
# mean/standard deviation parametrization
bm2 <- mixbeta(rob = c(0.2, 0.3, 0.2), inf = c(0.8, 0.4, 0.01), param = "ms")
# mean/observations parametrization
bm3 <- mixbeta(rob = c(0.2, 0.3, 5), inf = c(0.8, 0.4, 30), param = "mn")
# even mixed is possible
bm4 <- mixbeta(rob = c(0.2, mn2beta(0.3, 5)), inf = c(0.8, ms2beta(0.4, 0.1)))
# print methods are defined
bm4
print(bm4)
Run the code above in your browser using DataLab