bdp_dw_mcmc: MH sampler for BDP-DW method

View source: R/dynamicWhittle_MCMC_zigzag.R

bdp_dw_mcmcR Documentation

MH sampler for BDP-DW method

Description

Obtain samples of the posterior of the Whittle likelihood in conjunction with a Bernstein-Dirichlet prior on the spectral density.

Usage

bdp_dw_mcmc(
  data,
  m,
  likelihood_thinning = 1,
  mcmc_params,
  prior_params,
  monitor = FALSE,
  print_interval = 100
)

Arguments

data

numeric vector.

m

window size needed to calculate moving periodogram.

likelihood_thinning

the thinning factor of the dynamic Whittle likelihood.

mcmc_params

a list generated by bdp_dw_mcmc_params_gen.

prior_params

a list generated by bdp_dw_prior_params_gen.

monitor

a Boolean value (default FALSE) indicating whether to display the real-time status

print_interval

If monitor = TRUE, then this value indicates the number of iterations after which a status is printed to console; If monitor = FALSE, it does not have any effect

Details

Further detail can be found in the simulation study section in the references papers.

Value

list containing the following fields:

k1,k2,tau,V,W1,W2

posterior traces of PSD parameters

tim

total run time

prior_params

the specifications of the prior

References

Y. Tang et al. (2023) Bayesian nonparametric spectral analysis of locally stationary processes ArXiv preprint <arXiv:2303.11561>


beyondWhittle documentation built on May 31, 2023, 6:51 p.m.