# beyondWhittle v1.1.1

0

Monthly downloads

## Bayesian Spectral Inference for Stationary Time Series

Implementations of Bayesian parametric, nonparametric and semiparametric procedures for univariate and multivariate time series. The package is based on the methods presented in C. Kirch et al (2018) <doi:10.1214/18-BA1126> and A. Meier (2018) <https://opendata.uni-halle.de//handle/1981185920/13470>. It was supported by DFG grant KI 1443/3-1.

## Functions in beyondWhittle

Name | Description | |

arma_conditional | Negative ARMA(p, q) log likelihood | |

beyondWhittle-package | Bayesian spectral inference for stationary time series | |

betaBasis_k | Construct Bernstein polynomial basis of degree k on omega | |

center | mean center a numerical vector | |

fast_ift | Fast Inverse Fourier Transform | |

VARMAcov_muted | 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_ft | Fast Fourier Transform | |

Adj | adjoint of complex matrix | |

gibbs_VAR_nuisance_intern | Gibbs sampling algorithm for VAR model | |

gibbs_ar | 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 | |

dbList | Construct Bernstein polynomial basises of degree up to kmax on omega | |

gibbs_vnp | Gibbs sampler for multivaiate Bayesian nonparametric inference with Whittle likelihood | |

llike | Log corrected parametric AR likelihood (Gaussian) | |

acvBlockMatrix | Build an nd times nd Block Toeplitz matrix from the (d times d) autocovariances gamma(0),...,gamma(n-1) | |

hasEigenValueSmallerZero | Does a matrix have an eigenvalue smaller than 0? | |

acvMatrix | Build an n times n Toeplitz matrix from the autocovariance values gamma(0),...,gamma(n-1) | |

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

is_hpd | Check if a matrix is Hermitian positive definite | |

is_quadratic | Is l quadratic? | |

complexValuedPsd | Inverse function to realValuedPsd | |

cube_from_NumericVector | I/O: Only used within Rcpp Note: Same workaround as cx_cube_from_ComplexVector | |

genEpsARMAC | Get epsilon process (i.e. model residuals) for ARMA(p,q) | |

unit_trace_I_l | Range intervals I_l, see (63) in Mittelbach et al. | |

plot.gibbs_psd | Plot method for gibbs_psd class | |

mpdgrm | Compute Periodgram matrix from (complex-valued) Fourier coefficients | |

uniformmax_multi | Helping function for uci_matrix | |

mixtureWeight | 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 | |

coarsened_bernstein | Construct coarsened Bernstein polynomial basis of degree l on omega | |

unit_trace_log_f_l | Get log(f_l), see (66) in Mittelbach et al. Helping function for unit_trace_runif | |

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

get_U_cpp | Get U from phi, vectorized, cpp internal only | |

coarsened_bernstein_i | Helping function for coarsened_bernstein | |

unit_trace_mu | Get mu vector, see (36) in Mittelbach et al. Helping function for unit_trace_runif | |

fast_mean | Help function to compute the mean. | |

my_rdirichlet | Generate a random samples from a Dirichlet distribution | |

logfuller | Fuller Logarithm | |

gibbs_var | Gibbs sampler for vector autoregressive model. | |

lpost | Log posterior = log prior + log corrected parametric likelihood | |

get_f_matrix | Construct psd mixture | |

densityMixture | Construct a density mixture from mixture weights and density functions. | |

epsilon_var | epsilon process (residuals) of VAR model | |

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

lpost_AR | Log Posterior = Log Prior + (conditional) Log Likelihood | |

mdft | Multivariate discrete (fast) Fourier Transform | |

psd_arma | ARMA(p,q) spectral density function | |

qpsd | Compute normalized PSD in the Bernstein-Dirichlet parametrization. | |

lprior_AR | Log prior for PACF (~Beta) and sigma2 (~InverseGamma), unnormalized | |

print_warn | Help function to print debugging messages | |

print.gibbs_psd | Print method for gibbs_psd class | |

nll_norm | Negative log likelihood of iid standard normal observations [unit variance] Note: deprecated | |

plotMPsd | Visualization of multivariate PSDs Used in plot.gibbs_psd | |

realValuedPsd | Store imaginary parts above and real parts below the diagonal | |

lprior | Log prior of Bernstein-Dirichlet mixture and parametric working model -- all unnormalized | |

is_spd | Check if a matrix is symmetric positive definite | |

llike_var_partial | VAR(p) partial likelihood (unnormalized) Note: Fine for fixed p, but not suited for model comparison | |

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

midft | Multivariate inverse discrete (fast) Fourier Transform | |

print_mcmc_state | Help function to print MCMC state | |

sim_varma | Simulate from a VARMA model | |

missingValues_str_help | 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_freq | Fourier frequencies | |

logDet_stickBreaking | Log determinant of stick breaking transformation V -> p | |

unit_trace_nu | Get log(nu) vector, see (38) in Mittelbach et al. Helping function for unit_trace_runif | |

gibbs_npc | Gibbs sampler for Bayesian semiparametric inference with the corrected AR likelihood | |

gibbs_np | Gibbs sampler for Bayesian nonparametric inference with Whittle likelihood | |

unit_trace_p | Get p vector, see (67) in Mittelbach et al. | |

pFromV | Get p from v in Stick Breaking DP representation | |

transfer_polynomial | VARMA transfer polynomials | |

psd_dummy_model | Time series model X_t=e_t, E[e_t]=0 | |

omegaFreq | Fourier frequencies rescaled on the unit interval | |

summary.gibbs_psd | Summary method for gibbs_psd class | |

psd_array | Convert psd vector to array (compatibility: to use plotMPsd for univariate functions as well) | |

pacf2AR | C++ function for computing AR coefficients from PACF. See Section III in Barndorff-Nielsen and Schou (1973) | |

llike_var | VAR(p) likelihood | |

llike_var_full | VAR(p) full likelihood | |

psd_varma | VARMA(p,q) spectral density function | |

sldmvnorm | sum of multivariate normal log densities with mean 0 and covariance Sigma, unnormalized | |

unit_trace_runif_single | Obtain one uniform draw from d times d Hpd matrices with unit trace See Algorithm 2 in Mittelbach et al. (adjusted to complex case) | |

uniformmax_help | Helping function for uci_matrix | |

uniformmax | Uniform maximum, as needed for uniform credible intervals | |

unit_trace_log_d | Get log(d) vector, see (39) in Mittelbach et al, adjusted to complex case Helping function for unit_trace_runif | |

unit_trace_log_c | Get log(c) vector, see (70) in Mittelbach et al. Helping function for unit_trace_runif | |

scree_type_ar | Negative log AR likelihood values for scree-type plots | |

rmvnorm | Simulate from a Multivariate Normal Distribution | |

pacf_to_ar | Convert partial autocorrelation coefficients to AR coefficients. | |

uci_help | Helping function for uci_matrix | |

uci_matrix | Uniform credible intervals in matrix-valued case | |

unit_trace_x_from_phi | Get x from phi, see (62) in Mittelbach et al. | |

unrollPsd | Redundantly roll out a PSD from length N=floor(n/2) to length n | |

unit_trace_sigma2 | Get sigma2 vector, see (70) in Mittelbach et al. Helping function for unit_trace_runif | |

vFromP | Get v from p (DP inverse stick breaking) Note: p is assumed to have length L, i.e. it does NOT contain p_0 | |

unit_trace_runif | Draw uniformly from Hpd matrices with unit trace | |

unit_trace_q | Get q vector, see (68) in Mittelbach et al. | |

unit_trace_L_from_x | Get L (lower triangular Cholesky) from x Called U^* in Mittelbach et al, see (60) there | |

unit_trace_U_from_phi | Get U (Hpd with unit trace) matrix from phi (hyperspherical coordinates) vector. | |

psd_varma_help | helping function for psd_varma | |

varma_transfer2psd | Get VARMA PSD from transfer polynomials Helping function for psd_varma | |

acceptanceRate | Computing acceptance rate based on trace Note: Only use for traces from continous distributions! | |

VAR_regressor_matrix | VAR regressor matrix, see Section 2.2.3 in Koop and Korobilis (2010) | |

No Results! |

## Last month downloads

## Details

Type | Package |

Date | 2019-07-11 |

License | GPL (>= 3) |

LinkingTo | Rcpp, RcppArmadillo, BH |

RoxygenNote | 6.1.1 |

NeedsCompilation | yes |

Packaged | 2019-07-11 18:16:47 UTC; alexandermeier |

Repository | CRAN |

Date/Publication | 2019-07-11 22:00:01 UTC |

linkingto | BH , RcppArmadillo |

imports | forecast , ltsa (>= 1.4.6) , MASS , MTS , Rcpp (>= 0.12.5) |

Contributors | Claudia Kirch, Renate Meyer, Matthew C. Edwards |

#### Include our badge in your README

```
[![Rdoc](http://www.rdocumentation.org/badges/version/beyondWhittle)](http://www.rdocumentation.org/packages/beyondWhittle)
```