View source: R/mixturiseVector.R
mixturiseVector | R Documentation |
Given m
vector distributions of length N
, creates a single vector
distribution consisting of n
mixture distributions mixing the m
vectors.
mixturiseVector(vecdists, weights = "uniform")
vecdists |
|
weights |
|
Let v1 = (D11, D12,...,D1N) and v2 = (D21, D22,...,D2N) then the
mixturiseVector
function creates the vector distribution v3 = (D31, D32, ..., D3N)
where D3N = m(D1N, D2N, wN)
where m
is a mixture distribution with weights wN
.
## Not run: v1 <- VectorDistribution$new(distribution = "Binomial", params = data.frame(size = 1:2)) v2 <- VectorDistribution$new(distribution = "Binomial", params = data.frame(size = 3:4)) mv1 <- mixturiseVector(list(v1, v2)) # equivalently mv2 <- VectorDistribution$new(list( MixtureDistribution$new(distribution = "Binomial", params = data.frame(size = c(1, 3))), MixtureDistribution$new(distribution = "Binomial", params = data.frame(size = c(2, 4))) )) mv1$pdf(1:5) mv2$pdf(1:5) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.