Description Usage Arguments Details Value Author(s) References See Also Examples
Deterministic objects determine their values from other nodes in the mcmc model. They have no contribution to the overall likelihood of the model, but are frequently used as hyperparmeters of stochastic objects.
1 2 3 | deterministic(f, ...)
linear(X,b)
linear.grouped(X,b,group)
|
f |
a user provided funtion that updates the value of the variable |
X |
the data matrix X to be used in estimation |
b |
the coefficient vector b to be used in estimation |
group |
an integer vector equal in length to the rows of X indicating the group membership of the corresponding row |
... |
arguments to function f |
The number of arguments must match the arity of function f.
an rcppbugs object representing the deterministic object.
rcppbugs was written by Whit Armstrong.
https://github.com/armstrtw/CppBugs
1 2 3 4 5 6 7 8 | NR <- 1e2L
NC <- 2L
y <- matrix(rnorm(NR,1),nr=NR,nc=1L)
X <- matrix(nr=NR,nc=NC)
b <- mcmc.normal(rnorm(NC),mu=0,tau=0.0001)
y.hat.user <- deterministic(function(X,b) { X %*% b }, X, b)
y.hat.cpp <- linear(X,b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.