| B2DistHyper | R Documentation |
A distribution of distributions based a distribution family with random hyperparameters.
B2DistHyper(
density,
basis,
paramSimulator,
...,
simulator = NULL,
.hyperparameters = list(...)
)
density |
A function that can be called with a vectorized x of data values of the BayesSpace and parameters, to calculate a density. |
basis |
A BayesSpaceBasis (or an object that can be converted to one) of BayesSpace containing the values of the distribution (of distributions). |
paramSimulator |
A function to be called without arguments to simulate one set of parameters. |
... |
parameters to be given to parametersimulator |
simulator |
A function that can be called with an integer n and the parameters to create n random simulations. This function creates a distribution, which can be used to simulate distributional objects according to the random hyperparameters. |
.hyperparameters |
the list of parametrs to be given to the the parameterSimulator |
A B2DistHyper object encoding the distribution.
D = B2DistHyper(dbeta,B2Unif01Basis5,function() rexp(2),simulator=rbeta)
simulate(D,4,seed=47)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.