conditional_gmrf | R Documentation |
Generates samples from a Gaussian Markov random field (GMRF) conditional upon fixed values for some elements.
conditional_gmrf(
Q,
observed_idx,
x_obs,
n_sims = 1,
what = c("simulate", "predict")
)
Q |
precision for a zero-centered GMRF. |
observed_idx |
integer vector listing rows of |
x_obs |
numeric vector with fixed values for indices |
n_sims |
integer listing number of simulated values |
what |
Whether to simulate from the conditional GMRF, or predict the mean and precision |
A matrix with n_sims
columns and a row for every row of Q
not in
observed_idx
, with simulations for those rows
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.