transfn_exdqlmISVB {exdqlm}R Documentation

Transfer Function exDQLM - ISVB algorithm

Description

The function applies an Importance Sampling Variational Bayes (ISVB) algorithm to estimate the posterior of an exDQLM with exponential decay transfer function component.

Usage

transfn_exdqlmISVB(
  y,
  p0,
  model,
  X,
  df,
  dim.df,
  lam,
  tf.df,
  fix.gamma = FALSE,
  gam.init = NA,
  fix.sigma = TRUE,
  sig.init = NA,
  dqlm.ind = FALSE,
  exps0,
  tol = 0.1,
  n.IS = 500,
  n.samp = 200,
  PriorSigma = NULL,
  PriorGamma = NULL,
  tf.m0 = rep(0, 2),
  tf.C0 = diag(1, 2),
  verbose = TRUE
)

Arguments

y

A univariate time-series.

p0

The quantile of interest, a value between 0 and 1.

model

List of the state-space model including GG, FF, prior parameters m0 and C0.

X

A univariate time-series which will be the input of the transfer function component.

df

Discount factors for each block.

dim.df

Dimension of each block of discount factors.

lam

Transfer function rate parameter lambda, a value between 0 and 1.

tf.df

Discount factor(s) used for the transfer function component.

fix.gamma

Logical value indicating whether to fix gamma at gam.init. Default is FALSE.

gam.init

Initial value for gamma (skewness parameter), or value at which gamma will be fixed if fix.gamma=TRUE.

fix.sigma

Logical value indicating whether to fix sigma at sig.init. Default is TRUE.

sig.init

Initial value for sigma (scale parameter), or value at which sigma will be fixed if fix.sigma=TRUE.

dqlm.ind

Logical value indicating whether to fix gamma at 0, reducing the exDQLM to the special case of the DQLM. Default is FALSE.

exps0

Initial value for dynamic quantile. If exps0 is not specified, it is set to the DLM estimate of the p0 quantile.

tol

Tolerance for convergence of dynamic quantile estimates. Default is tol=0.1.

n.IS

Number of particles for the importance sampling of joint variational distribution of sigma and gamma. Default is n.IS=500.

n.samp

Number of samples to draw from the approximated posterior distribution. Default is n.samp=200.

PriorSigma

List of parameters for inverse gamma prior on sigma; shape a_sig and scale b_sig. Default is an inverse gamma with mean 1 (or sig.init if provided) and variance 10.

PriorGamma

List of parameters for truncated student-t prior on gamma; center m_gam, scale s_gam and degrees of freedom df_gam. Default is a standard student-t with 1 degree of freedom, truncated to the support of gamma.

tf.m0

Prior mean of the transfer function component.

tf.C0

Prior covariance of the transfer function component.

verbose

Logical value indicating whether progress should be displayed.

Value

A list of the following is returned:

If dqlm.ind=FALSE, the list also contains:

Or if dqlm.ind=TRUE, the list also contains:

Examples


y = scIVTmag[1:1095]
X = ELIanoms[1:1095]
trend.comp = polytrendMod(1,mean(y),10)
seas.comp = seasMod(365,c(1,2,4),C0=10*diag(6))
model = combineMods(trend.comp,seas.comp)
M1 = transfn_exdqlmISVB(y,p0=0.85,model=model,
                          X,df=c(1,1),dim.df = c(1,6),
                          gam.init=-3.5,sig.init=15,
                          lam=0.38,tf.df=c(0.97,0.97))



[Package exdqlm version 0.1.3 Index]