Learn R Programming

⚠️There's a newer version (1.3.0) of this package.Take me there.

beyondWhittle (version 1.0)

Bayesian Spectral Inference for Stationary Time Series

Description

Implementations of a Bayesian parametric (autoregressive), a Bayesian nonparametric (Whittle likelihood with Bernstein-Dirichlet prior) and a Bayesian semiparametric (autoregressive likelihood with Bernstein-Dirichlet correction) procedure are provided. The work is based on the corrected parametric likelihood by C. Kirch et al (2017) . It was supported by DFG grant KI 1443/3-1.

Copy Link

Version

Install

install.packages('beyondWhittle')

Monthly Downloads

502

Version

1.0

License

GPL (>= 3)

Maintainer

Alexander Meier

Last Published

July 16th, 2018

Functions in beyondWhittle (1.0)

fast_mean

Help function to compute the mean.
generalizedGaussian.alpha

Help function for Generalized Gaussian
logfuller

Help function: Fuller Logarithm
l_generalizedGaussian

Help function for Generalized Gaussian
beyondWhittle-package

Bayesian spectral inference for stationary time series
lpost_AR

Log Posterior = Log Prior + (conditional) Log Likelihood
coarsened_bernstein

Help function for polynomial basis.
genEpsARC

C++ function for generating epsilon process for AR(p)
dtex.kurt

Density of t-distribution in terms of excess kurtosis
acvMatrix

C++ function to build a Toeplitz ACV matric, given an ACV vector.
my_ddirichlet_unnormalized

Help function for proposing new values of v's
densityMixture

C++ function for building a density mixture, given mixture weights and functions.
my_rdirichlet

Help function for proposing new values of v's
lprior

Log prior of Bernstein-Dirichlet mixture and parametric working model -- all unnormalized
generalizedGaussian.kurtosis

Help function for Generalized Gaussian
lprior_AR

Log prior for PACF (beta) and sigma2 (Inverse Gamma), unnormalized
gibbs_AR

Gibbs sampler for an autoregressive model with PACF parametrization.
reduceMemoryStorageMCMC

Help function for I/O
qpsd

Compute a PSD in the Bernstein-Dirichlet parametrization.
se_kurt

Help function: Standard error for kurtosis
genEpsARMAC

C++ function for generating epsilon process for ARMA(p,q)
nll_generalizedGaussian

Help function for Generalized Gaussian
uniformmax

Help function: Uniform maximu
nuisanceModel_linearTrend

Normal linear trend model, with nuisance time series
mixtureWeight

C++ function for computing mixture weights of Bernstein-Mixtures given the probabilities p, values w, and degree k.
gibbs_NP

Gibbs sampler for Bayesian nonparametric inference with Whittle likelihood
llike

Log corrected parametric likelihood
gibbs_NPC

Gibbs sampler for Bayesian semiparametric inference with the corrected AR likelihood
nll_norm

Negative log likelihood of iid standard normal observations [unit variance]
arma_conditional

Function for computing the ARMA(p, q) conditional likelihood Models with AR component: zt are from t = p + 1 to m Models with MA component: eps_0 = ... = eps_q+1 = 0 The input zt should be FCFZ, i.e., data corrected in freq. domain then IFTd FCFZ should be FCFZ[-c(1, n)]; i.e., have removed elements 1 and n beforehand No sigma2 in here anymore! ...: Further arguments to be passed to likelihood function
llike_AR

Time domain AR(p) likelihood for nuisance/noise time series
betaBasis_k

Help function for polynomial basis.
nll_norm_unnormalized

unnormalized negative log likelihood of iid standard normal observations [unit variance]
omegaFreq

Fourier frequencies, rescaled on the unit interval
gibbs_NP_nuisance

Bayesian nonparametric inference in nuisance model with Whittle likelihood
nuisanceModel_mean

Normal mean model, with nuisance time series
gibbs_NPC_nuisance

Bayesian semiparametric inference in nuisance model
pFromV

C++ function for generating p from v in Stick Breaking DP representation
logrosenthal

Help function: Rosenthal Logarithm
plotPsdEstimate

Help function for visualizing
nll_t

negative log likelihood of iid t observations with given excess kurtosis [unit variance]
print_warn

Help function to print debugging messages
pacfToAR

Convert partial autocorrelation coefficients to AR coefficients.
lpost

Log corrected posterior
unrollPsd

C++ help function to redundantly roll out a PSD to length n
plotMCMC

Help function for visualizing
psd_arma

Compute the ARMA(p,q) spectral density
pacf2AR

C++ function for computing AR coefficients, given PACF.
psd_dummy_model

Time series model X_t=e_t, E[e_t]=0, without additional parameters Not public, since encapsulated in an extra function, for easier usage
vFromP

C++ function for generating v from p (inverse stick breaking) NOTE: p is assumed to have length L, i.e. it does NOT contain p_0 !!
pacf2ARacv

C++ function for computing ACV function, given PACF and variance.
acceptanceRate

C++ function for computing acceptance rate based on trace Note: Only use for traces from continous distributions!
fast_ft

Compute F_n X_n with the real-valued Fourier matrix F_n
gibbs_nuisance

Gibbs sampler for corrected parametric likelihood + Bernstein-Dirichlet mixture, including possibility of using time series as mere nuisance parameter
fast_ift

Compute F_n^t X_n with the real-valued Fourier matrix F_n
ar_lik

Likelihood of an autoregressive time series model with i.i.d. normal innovations
ar_screeType

Negative log likelihood values for scree-type plots
filenameMCMC

Help function for I/O
genEpsMAC

C++ function for generating epsilon process for MA(q)
coarsened_bernstein_i

Help function for polynomial basis.
gibbs_AR_nuisance

Bayesian parametric (AR) inference in nuisance model, with PACF parametrization
logDet_stickBreaking

Help function for proposing new values of v's
dbList

Help function for polynomial basis.
gibbs_AR_nuisance_intern

Gibbs sampler for Bayesian AR model in PACF parametrization, including support for TS to be a nuisance parameter