R/Samplers.R

Defines functions f_SamplerFUNDefault

f_SamplerFUNDefault <- function(f_posterior, data, spec, par0, ctr) {
  p.log <- function(vPw) {
    return(f_posterior(vPw = vPw, data = data, spec = spec, PriorFun = TRUE))
  }
  draw <- f_RCPP_adaptMCMC(theta0 = par0, acc_rate = 0.25, 
                           sigma = diag(length(par0)), 
                           func = p.log, n_mcmc = ctr$nburn + ctr$nmcmc)
  colnames(draw) = names(par0)
  return(draw)
}

Try the MSGARCH package in your browser

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

MSGARCH documentation built on Dec. 6, 2022, 1:06 a.m.