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")
)A matrix with n_sims columns and a row for every row of Q not in
observed_idx, with simulations for those rows
precision for a zero-centered GMRF.
integer vector listing rows of Q corresponding to
fixed measurements
numeric vector with fixed values for indices observed_idx
integer listing number of simulated values
Whether to simulate from the conditional GMRF, or predict the mean and precision