Description Usage Arguments Value Author(s) References See Also Examples
Create stochastic objects in the spirit of PyMC.
1 2 3 4 5 6 | mcmc.normal(x, mu, tau, observed = FALSE)
mcmc.uniform(x, lower, upper, observed = FALSE)
mcmc.gamma(x, alpha, beta, observed = FALSE)
mcmc.beta(x, alpha, beta, observed = FALSE)
mcmc.bernoulli(x, p, observed = FALSE)
mcmc.binomial(x, n, p, observed = FALSE)
|
x |
the initial value of the object |
mu |
the mean for normally distributed objects |
tau |
the precision of normally distributed objects |
lower |
the lower limit of the uniform distribution |
upper |
the upper limit of the uniform distribution |
alpha |
the shape parameter of the gamma distribution |
beta |
the scale parameter of the gamma distribution |
n |
the sample size of a binomial distribution |
p |
the success rate in bernoulli or binomial distributions |
observed |
whether the object should be treated as constant data or simulated over the MCMC chain |
an rcppbugs object corresponding to the particular distribution requested
rcppbugs was written by Whit Armstrong.
https://github.com/armstrtw/CppBugs
1 2 3 | b <- mcmc.normal(rnorm(10),mu=0,tau=0.0001)
tau <- mcmc.gamma(runif(1),alpha=0.1,beta=0.1)
b.unif <- mcmc.uniform(runif(1),lower=0,upper=100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.