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