View source: R/03-latent-variables.R
These functions calculate priors and posteriors of the latent Gaussian variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 | logprior_W(W, model_data, theta = NULL, Q = NULL)
log_posterior_W(W, theta, model_data, Q = NULL)
grad_log_posterior_W(W, theta, model_data, Q = NULL)
hessian_log_posterior_W(
W,
theta = NULL,
Q = NULL,
model_data,
structure = NULL
)
|
W |
Value of W = (delta,gamma,beta) to calculate the prior/posterior at. The order is as it appears in the appendix of the paper- (delta_1_1,...,delta_n_Jn,gamma_1,...,gamma_M,beta_1,...,beta_p). The order of gamma and beta is the same as they are listed in model_data$model_elements. |
model_data |
A ccmodeldata object returned by model_setup(). |
theta |
Value of the hyperparameter vector theta. The Q matrix depends on this. Can leave as NULL if you're passing in the Q matrix |
Q |
The Q-matrix as returned by Q_matrix(model). If not provided, will be calculated. |
structure |
Optional. Pass in the sparse structure of the hessian of the log-likelihood to save computing time. See hessian_log_likelihood_structure(). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.