epsilon process (residuals) of VAR model
dbList_dw_Bern_for_lambda
Construct Bernstein polynomial bases of degree up to kmax on omega for frequency parameter lambda
Fast Inverse Fourier Transform
BDP-DW method: performing posterior sampling and calculating statistics based on the posterior samples
Gibbs sampler for an autoregressive model with PACF parametrization.
Helping function for coarsened_bernstein
Inverse function to realValuedPsd
Help function to compute the mean.
Construct a density mixture from mixture weights and density functions.
Gibbs sampler for multivaiate Bayesian nonparametric inference with Whittle likelihood
Fourier frequencies
Fast Fourier Transform
Construct Bernstein polynomial bases of degree up to kmax on omega
Gibbs sampler for Bayesian AR model in PACF parametrization,
including support for TS to be a nuisance parameter
Get epsilon process (i.e. model residuals) for ARMA(p,q)
VAR(p) full likelihood
Get string representation for missing values position from vector index
Construct Bernstein polynomial basises of degree up to kmax on omega
gibbs_VAR_nuisance_intern
Gibbs sampling algorithm for VAR model
Gibbs sampler for corrected parametric likelihood + Bernstein-Dirichlet mixture,
including possibility of using time series as mere nuisance parameter
gibbs_multivariate_nuisance_cpp
Gibbs sampler in Cpp
Gibbs sampler for vector autoregressive model.
Get U from phi, vectorized, cpp internal only
Construct psd mixture
Fuller Logarithm
Bayesian spectral inference for time series
VAR(p) partial likelihood (unnormalized)
Note: Fine for fixed p, but not suited for model comparison
I/O: Only used within Rcpp
Note: Same workaround as cx_cube_from_ComplexVector
VAR(p) likelihood
Get mixture weights of Bernstein-Dirchlet-Mixtures
Calculating log likelihood
Log posterior = log prior + log corrected parametric likelihood
gibbs_multivariate_nuisance
Gibbs sampler for corrected parametric likelihood + Bernstein-Dirichlet mixture,
including possibility of using time series as mere nuisance parameter
Multivariate case
Compute Periodgram matrix from (complex-valued) Fourier coefficients
Plot method for bdp_dw_result class
Gibbs sampler for Bayesian nonparametric inference with Whittle likelihood
cx_cube_from_ComplexVector
I/O: Only used within Rcpp
Log prior for PACF (~Beta) and sigma2 (~InverseGamma), unnormalized
Print method for bdp_dw_result class
Plot method for bdp_dw_tv_psd class
simulate from the tvARMA(1,2) process for illustration
Generate a random samples from a Dirichlet distribution
Negative log AR likelihood values for scree-type plots
Simulate from a VARMA model
Is l quadratic?
Check if a matrix is Hermitian positive definite
Log Posterior = Log Prior + (conditional) Log Likelihood
Calculation of log prior
Log corrected parametric AR likelihood (Gaussian)
Time domain AR(p) likelihood for nuisance/noise time series
Plot method for gibbs_psd class
Convert partial autocorrelation coefficients to AR coefficients.
Visualization of multivariate PSDs
Used in plot.gibbs_psd
Get p from v in Stick Breaking DP representation
Does a matrix have an eigenvalue smaller than 0?
Log prior of Bernstein-Dirichlet mixture and parametric working model -- all unnormalized
phiFromBeta_normalInverseWishart
Convert vector parametrization (beta) to matrix-parametrization (phi),
the latter as e.g. used in MTS::VAR()$ar
Gibbs sampler for Bayesian semiparametric inference with the corrected AR likelihood
Calculate the moving Fourier transform ordinates
Log determinant of stick breaking transformation V -> p
sum of multivariate normal log densities
with mean 0 and covariance Sigma, unnormalized
Check if a matrix is symmetric positive definite
Multivariate discrete (fast) Fourier Transform
Multivariate inverse discrete (fast) Fourier Transform
helping function for psd_varma
Likelihood of an autoregressive time series model with i.i.d. normal innovations
C++ function for computing AR coefficients from PACF.
See Section III in Barndorff-Nielsen and Schou (1973)
time-varying spectral density function of the tvARMA(1,2) processes for illustrations
ARMA(p,q) spectral density function
Simulate from a Multivariate Normal Distribution
Store imaginary parts above and real parts below the diagonal
Help function to print debugging messages
print_summary_gibbs_psd_help
Helping function for print and summary (both are quite similar)
Help function to print MCMC state
Summary method for gibbs_psd class
Summary method for bdp_dw_result class
VARMA(p,q) spectral density function
Helping function for uci_matrix
Get mu vector, see (36) in Mittelbach et al.
Helping function for unit_trace_runif
VARMA transfer polynomials
Get log(d) vector, see (39) in Mittelbach et al, adjusted to complex case
Helping function for unit_trace_runif
Get log(nu) vector, see (38) in Mittelbach et al.
Helping function for unit_trace_runif
Draw uniformly from Hpd matrices with unit trace
Get log(f_l), see (66) in Mittelbach et al.
Helping function for unit_trace_runif
Obtain one uniform draw from d times d Hpd matrices with unit trace
See Algorithm 2 in Mittelbach et al. (adjusted to complex case)
Print method for gibbs_psd class
Negative log likelihood of iid standard normal observations [unit variance]
Note: deprecated
Convert psd vector to array
(compatibility: to use plotMPsd for univariate functions as well)
Fourier frequencies rescaled on the unit interval
qpsd_dw.tilde_zigzag_cpp_expedited
Evaluation of normalized time-varying spectral density function (for MCMC algorithm)
Helping function for uci_matrix
Evaluation of normalized time-varying spectral density function (based on posterior samples)
Compute normalized PSD in the Bernstein-Dirichlet parametrization.
Get VARMA PSD from transfer polynomials
Helping function for psd_varma
Range intervals I_l, see (63) in Mittelbach et al.
Get L (lower triangular Cholesky) from x
Called U^* in Mittelbach et al, see (60) there
Get sigma2 vector, see (70) in Mittelbach et al.
Helping function for unit_trace_runif
Get log(c) vector, see (70) in Mittelbach et al.
Helping function for unit_trace_runif
Get x from phi, see (62) in Mittelbach et al.
Helping function for uci_matrix
Get U (Hpd with unit trace) matrix from
phi (hyperspherical coordinates) vector.
Time series model X_t=e_t, E[e_t]=0
Uniform maximum, as needed for uniform credible intervals
Uniform credible intervals in matrix-valued case
Get q vector, see (68) in Mittelbach et al.
Get p vector, see (67) in Mittelbach et al.
Redundantly roll out a PSD from length N=floor(n/2) to length n
Get v from p (DP inverse stick breaking)
Note: p is assumed to have length L, i.e. it does NOT contain p_0
adjoint of complex matrix
Build an nd times nd Block Toeplitz matrix from the
(d times d) autocovariances gamma(0),...,gamma(n-1)
Generate a list of parameter values in prior elicitation
a generic method for bdp_dw_result class
bayes_factor.bdp_dw_result
Extracting the Bayes factor of k1=1 from bdp_dw_result class
Calculating the estimated posterior mean, median and credible region (tv-PSD)
Computing acceptance rate based on trace
Note: Only use for traces from continous distributions!
mean center a numerical vector
Psi-weight calculation for a VARMA model.
NOTE: This is an exact copy of the MTS::PSIwgt function
(only with the plot functionality removed, as not needed).
This has to be done because the MTS package has been removed
from CRAN in April 2022.
Construct Bernstein polynomial basis of degree k on omega
Construct coarsened Bernstein polynomial basis of degree l on omega
This is a nearly exact copy of the MTS::VARMAcov function, where
the output commands at the end are removed.
This has to be done because the function is called repeatedly
within the MCMC algorithm.
For future versions of the package, a better solution is intended.
VAR regressor matrix, see Section 2.2.3 in Koop and Korobilis (2010)
Construct Bernstein polynomial basis of degree k on omega
Estimating the Bayes factor of hypothesis "k1 = 1".
Build an n times n Toeplitz matrix from the
autocovariance values gamma(0),...,gamma(n-1)
Negative ARMA(p, q) log likelihood
Generate a list of values for MCMC algorithm
MH sampler for BDP-DW method