global_var_components: Get global variable density components

Description Usage Arguments Value

View source: R/global_var_components.R

Description

Obtains log joint density components for global variables, to be used when computing the log joint density. Values are due to the default conjugate Wishart prior from Kass and Natarajan (2006). See Tan (2021) for more details.

Usage

1
global_var_components(theta, n, p, r)

Arguments

theta

A vector of length p + r(r+1)/2 + nr, containing first local then global variables

n

Integer. Number of total observations in data.

p

Integer. Dimension of fixed effects (beta) in a GLMM

r

Integer. Dimension of random effects (b) in a GLMM

Value

List containing components needed to compute log joint density. In reverse order, includes the precision matrix Omega, its Cholesky decomposition W, the vector of fixed effects beta, the weighted sum of the log diagonal of W, and the sequence used to determine the weights.


hrnasif/rvb documentation built on Dec. 20, 2021, 4:49 p.m.