Description Usage Arguments Value See Also
Use MCMC to approximate the posterior distribution
| 1 2 3 4 5 6 7 |   mcmcposterior(data, sampler = BNSampler,
    prior = priorUniform(initial),
    logScoreFUN = logScoreMultDirFUN(),
    logScoreParameters = list(hyperparameters = "bdeu"),
    constraint = NULL, maxNumberParents = NULL,
    nSamples = 50000, time = F, nBurnin = 10000,
    initial = empty(ncol(data), "bn"), verbose = T)
 | 
| data | The data. | 
| sampler | A BNSampler. eg BNSampler or BNGibbsSampler etc | 
| prior | A list of functions of the same length as
 | 
| logScoreFUN | A list of four elements: 
 | 
| logScoreParameters | A list of parameters that are passed to logScoreFUN. | 
| constraint | A matrix of dimension ncol(data) x ncol(data) giving constraints to the sample space. The (i, j) element is 1 if the edge i -> j is required -1 if the edge i -> is excluded. 0 if the edge i -> j is not constrained. The diagonal of constraint must be all 0. | 
| maxNumberParents | Integer of length 1. The maximum number of parents of any node. | 
| nSamples | The number of samples to be draw. Set
this to  | 
| time | The number of seconds to spend drawing
samples. Set this to  | 
| nBurnin | The number of samples to discard from the beginning of the sample. | 
| initial | An object of class 'bn'. The starting value of the MCMC. | 
| verbose | A logical. Should a progress bar be displayed? | 
A bnpostmcmc object.
For more control, use the MCMC sampler directly, e.g.
BNSampler. See also
posterior.  Example priors
priorGraph, priorUniform.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.