| simulate.B2DistHyper | R Documentation |
Simulates a B2DistHyper distribution
## S3 method for class 'B2DistHyper'
simulate(
object,
nsim = 1,
seed = NULL,
density = object$density,
basis = object$basis,
paramSimulator = object$paramSimulator,
simulator = object$simulator,
hyperparameters = object$hyperparameters,
...
)
object |
an B2DistHyper object as returned from B2DistHyper |
nsim |
the number of simulations |
seed |
a seed eventually to be set before the simulation (use with care!) |
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. |
simulator |
A function that can be called with an integer n and the parameters to create n random simulations. |
hyperparameters |
the list of parametrs to be given to the the parameterSimulator |
... |
futher unused parameters, required to fullfill the generic definition of simulate |
A [BDataDensities] following the given distribution.
[stats::simulate]
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.