R/nextA.R

nextA = function(b, d, env) {
  SQNP <- sqrt(env$gNP)
  
  # draws from multivariate normals can be taken using 
  # draws = mu + l * eta where l*l' = d (l is the cholesky decomposition)      

  # accounting for non-diffuse priors
  newDraw = colMeans(b) + t(chol(d)) %*% matrix(rnorm(env$gNIV), nrow = env$gNIV, ncol = 1)/SQNP 
  return(newDraw)
}

Try the RSGHB package in your browser

Any scripts or data that you put into this service are public.

RSGHB documentation built on July 4, 2019, 1:02 a.m.