Chapter 14 Resources for the User

14.1 Introduction

Section 14.2 lists the R packages that we have used in the different chapters. Section 14.3 shows a few examples of custom functions we have developed to facilitate some repetitive calculations; details are available in the GitHub link associated with the book. A user must source these files before running the code in each chapter. Section 14.4 presents often used R-INLA items, pulled into one place for the user.

14.2 Packages used in the book

package version source
astsa 1.13 CRAN (R 4.1.0)
dlm 1.1-5 CRAN (R 4.1.0)
gridExtra 2.3 CRAN (R 4.1.0)
gtools 3.8.2 CRAN (R 4.1.0)
INLA 21.02.23 local
kableExtra 1.3.4 CRAN (R 4.1.0)
lubridate 1.7.10 CRAN (R 4.1.0)
mapview 2.9.0 CRAN (R 4.1.0)
marima 2.2 CRAN (R 4.1.0)
Matrix 1.5-1 CRAN (R 4.1.2)
matrixcalc 1.0-5 CRAN (R 4.1.0)
mvtnorm 1.1-1 CRAN (R 4.1.0)
quantmod 0.4.20 CRAN (R 4.1.2)
raster 3.4-10 CRAN (R 4.1.0)
readxl 1.3.1 CRAN (R 4.1.0)
sf 0.9-8 CRAN (R 4.1.0)
spdep 1.1-8 CRAN (R 4.1.0)
tables 0.9.6 CRAN (R 4.1.0)
tidyverse 1.3.1 CRAN (R 4.1.0)
tmap 3.3-1 CRAN (R 4.1.0)
vars 1.5-6 CRAN (R 4.1.0)

14.3 Custom functions used in the book

We show different custom functions that we have developed for the user. They are grouped by functionality. The user must source the file containing these functions before running the code, as we show in the beginning of each chapter in the book. All codes and datasets used in the book can be accessed from https://github.com/ramanbala/dynamic-time-series-models-R-INLA.

Basic plotting functions

multiline.plot <-
  function(plot.data,
           title = "",
           xlab = "",
           ylab = "",
           line.type = "solid",
           line.size = 1,
           line.color = "auto") {
    cpalette <-
      c("#000000",
        "#56B4E9",
        "#009E73",
        "#0072B2",
        "#D55E00",
        "#CC79A7") 
    cname <- c("black", "blue", "green", "blue", "red", "purple")
    mp <- plot.data %>%
      pivot_longer(-time, names_to = "key", values_to = "dat")
    u <- unique(mp$key)
    mp$key <- factor(mp$key, levels = u)
    levels(mp$key) <- u
    mp.auto.color <- mp %>%
      ggplot(aes(x = time, y = dat, color = key)) +
      geom_line(size = line.size, linetype = line.type) +
      labs(x = xlab, y = ylab, colour = "") +
      ggtitle(title)
    mp.custom.color <- mp %>%
      ggplot(aes(x = time, y = dat, color = key)) +
      geom_line(size = line.size, linetype = line.type) +
      scale_color_manual(values = cpalette[match(line.color, cname)]) +
      labs(x = xlab, y = ylab, colour = "") +
      ggtitle(title)
  ifelse(line.color == "auto", return(mp.auto.color),
         return(mp.custom.color))
  }

Functions for forecast evaluation

mae <- function(yhold,
                yfore,
                text = NA,
                round.digit = 3) {
  efore <- yhold - yfore 
  mae <-  mean(abs(efore))
  if (is.na(text)) {
    return(paste("MAE is", round(mae, round.digit), sep = " "))
  } else {
    return(paste(text, round(mae, round.digit), sep = " "))
  }
}
mape <- function(yhold,
                 yfore,
                 text = NA,
                 round.digit = 3) {
  efore <- yhold - yfore 
  mape <-  mean(abs(efore / yhold))
  if (is.na(text)) {
    return(paste("MAPE is", round(mape * 100, round.digit), sep = " "))
  } else {
    return(paste(text, round(mape * 100, round.digit), sep = " "))
  }
}

Function for model comparison

# Model Selection Criteria - DIC, WAIC, PSBF and PIT
model.selection.criteria <- function(inla.result, plot.PIT = FALSE,
                                     n.train) {
  dic <- inla.result$dic$dic
  waic <- inla.result$waic$waic
  cpo <- inla.result$cpo$cpo
  psbf <- sum(log(cpo[1:n.train]))
  PIT <- inla.result$cpo$pit
  msc <- cbind(DIC=dic, WAIC = waic, PsBF = psbf)
  if(isTRUE(plot.PIT)){
    pit.hist <- hist(PIT, plot = F)
    return(list(msc = msc, hist=plot(pit.hist, main ="")))
  } else{
    return(msc = msc)
  }
  
}

Function for the filtering algorithm in DLM

filt.inla <-
  function(data.series,
           model = "rw1",
           ar.order = 0,
           trend = "no",
           alpha = "no") {
    pt <- proc.time()
    ### model formula
    eg <- expand.grid(
      model = c("rw1", "ar"),
      trend = c("yes", "no"),
      alpha = c("yes", "no")
    )
    eg <- apply(eg, 2, as.character)
    choice <- paste0(c(model, trend, alpha), collapse = ".")
    
    
    dat <- filt <- vector("list", length(data.series))
    for (k in 1:length(data.series)) {
      dat[[k]] <- data.series[1:k]
    }
    
    get.filter <- function(df, ar.order) {
      id <- trnd <- 1:length(df)
      inla.dat <- cbind.data.frame(data.series = df, trnd, id)
      ar.order <- as.numeric(ar.order)
      formula <- switch(
        choice,
        "rw1.no.no" = as.formula(
          paste0("data.series~-1+", "f(id, model='rw1', constr=FALSE)")
        ),
        "rw1.yes.no" = as.formula(
          paste0(
            "data.series~-1+trnd+",
            "f(id, model='rw1', constr=FALSE)"
          )
        ),
        "rw1.no.yes" = as.formula(
          paste0("data.series~ 1+", "f(id, model='rw1', constr=FALSE)")
        ),
        "rw1.yes.yes" = as.formula(
          paste0("data.series~ 1+trnd+", "f(id, model='rw1', constr=FALSE)")
        ),
        "ar.no.no" = as.formula(
          paste0("data.series~ -1+", "f(id, model='ar', order = ar.order)")
        ),
        "ar.yes.no" = as.formula(
          paste0(
            "data.series~ -1+trnd+",
            "f(id, model='ar', order = ar.order)"
          )
        ),
        "ar.no.yes" = as.formula(
          paste0("data.series~ 1+", "f(id, model='ar', order = ar.order)")
        ),
        "ar.yes.yes" = as.formula(
          paste0(
            "data.series~ 1+trnd+",
            "f(id, model='ar', order = ar.order)"
          )
        ),
      )
      model.inla <- inla(
        formula,
        family = "gaussian",
        data = inla.dat,
        control.predictor = list(compute = TRUE),
        control.compute = list(
          dic = T,
          config = TRUE,
          cpo = TRUE
        ),
        verbose = T
      )
      filt <- tail(model.inla$summary.random$id, 1)
      return(filt = filt)
    }
    #### model execution
    require(doParallel)
    require(foreach)
    cores <-  detectCores()
    if (cores > 2) {
      registerDoParallel(cores = detectCores() - 1)
    }
    
    if (ar.order > 1) {
      filt.all <-
        foreach (
          d = (2 + ar.order):length(data.series),
          .packages = c('tidyverse', 'INLA'),
          .verbose = T
        ) %dopar% {
          get.filter(dat[[d]], ar.order = ar.order)
        }
    } else{
      filt.all <-
        foreach (
          d = 2:length(data.series),
          .packages = c('tidyverse', 'INLA'),
          .verbose = T
        ) %dopar% {
          get.filter(dat[[d]], ar.order = ar.order)
        }
    }
    filt.all.bind <- bind_rows(filt.all)
    # filt.est <- c(NA, filt.all$mean)
    inla.time <- proc.time() - pt
    return(list(filt.all.bind = filt.all.bind, time.taken = inla.time))
  }

14.3.1 rgeneric() function for DLM-VAR model

inla.rgeneric.VAR_1 <-
  function(cmd = c("graph",
                   "Q",
                   "mu",
                   "initial",
                   "log.norm.const",
                   "log.prior",
                   "quit"),
           theta = NULL)
  {
    interpret.theta <- function() {
      n.phi <- k * k * p
      n.prec <- k
      n.tot <- n.phi + n.prec
      phi.VAR <-
        sapply(theta[as.integer(1:n.phi)], function(x) {
          x
        })
      # W matrix  precisions
      wprec <-
        sapply(theta[as.integer((n.phi + 1):(n.phi + n.prec))],
               function(x) {
                 exp(x)
               })
      param <- c(phi.VAR, wprec)
      W <- diag(1, n.prec)
      st.dev <- 1 / sqrt(wprec)
      st.dev.mat <-
        matrix(st.dev, ncol = 1) %*% matrix(st.dev, nrow = 1)
      W <- W * st.dev.mat
      PREC <- solve(W)
      return(list(
        param = param,
        VACOV = W,
        PREC = PREC,
        phi.vec = c(phi.VAR)
        ,
        n.phi = n.phi,
        n.prec = n.prec
      ))
    }
    #Precision matrix
    Q <- function() {
      param <- interpret.theta()
      phi.mat <- matrix(param$phi.vec, nrow = k)
      sigma.w.inv <- param$PREC
      A <- t(phi.mat) %*% sigma.w.inv %*% phi.mat
      B <- -t(phi.mat) %*% sigma.w.inv
      C <- sigma.w.inv
      # Construct mid-block:
      zero.mat <- matrix(0, nrow = 2, ncol = 2 * n)
      # Define the matrix block:
      mat <- cbind(t(B), A + C, B)
      # Initializing column id and matrix list:
      col.id <- list()
      mat.list <- list()
      col.id[[1]] <- 1:(3 * k)
      mat.list[[1]] <- zero.mat
      mat.list[[1]][, col.id[[1]]] <- mat
      for (id in 2:(n - 2)) {
        start.id <- col.id[[id - 1]][1] + k
        end.d <-  start.id + (3 * k - 1)
        col.id[[id]] <- start.id:end.d
        mat.list[[id]] <- zero.mat
        mat.list[[id]][, col.id[[id]]] <- mat
      }
      mid.block <- do.call(rbind, mat.list)
      tau.val <- 0.1
      diffuse.prec <- tau.val * diag(1, k)
      # Construct first and last row blocks and then join with mid block:
      first.row.block <-
        cbind(A + diffuse.prec, B, matrix(0, nrow = k, ncol = (k * n - k ^ 2)))
      last.row.block <-
        cbind(matrix(0, nrow = k, ncol = k * n - k ^ 2), t(B), C)
      toep.block.mat <-
        rbind(first.row.block, mid.block, last.row.block)
      # Changing to a sparse Matrix:
      prec.mat <- Matrix(toep.block.mat, sparse = TRUE)
      return(prec.mat)
    }
    # Graph function: Essentially Q matrix
    graph = function() {
      return (inla.as.sparse(Q()))
    }
    #Mean of model
    mu <- function() {
      return(numeric(0))
    }
    # Log normal constant:
    log.norm.const <- function() {
      Q <- Q()
      log.det.val <-
        Matrix::determinant(Q, logarithm = TRUE)$modulus
      val <- (-k * n / 2) * log(2 * pi) + 0.5 * log.det.val
      return (val)
    }
    log.prior <- function() {
      param <- interpret.theta()
      pars <- param$param
      k <- k
      total.par <- param$n.phi + param$n.prec
      # Normal prior for phi's:
      theta.phi <- theta[1:param$n.phi]
      phi.prior <-
        sum(sapply(theta.phi, function(x)
          dnorm(
            x,
            mean = 0,
            sd = 1,
            log = TRUE
          )))
      theta.prec <-
        theta[(param$n.phi + 1):(param$n.phi + param$n.prec)]
      prec.prior <-
        sum(sapply(theta.prec, function(x)
          dgamma(
            x,
            shape = 1,
            scale = 1,
            log = TRUE
          )))
      prec.jacob <- sum(theta.prec) # This is for precision terms
      prior.val <- phi.prior + prec.prior + prec.jacob
      return (prior.val)
    }
    initial = function() {
      phi.init <- c(0.1, 0.1, 0.1, 0.1)
      prec.init <- rep(1, k)
      init <- c(phi.init, prec.init)
      return (init)
    }
    if (as.integer(R.version$major) > 3) {
      if (!length(theta))
        theta <- initial()
    } else {
      if (is.null(theta)) {
        theta <- initial()
      }
    }
    val <- do.call(match.arg(cmd), args = list())
    return (val)
  }

14.4 Often used R-INLA items

Control options

Control options in the inla() function allow us to specify choices about the estimation process and output reporting. In Table 14.1, we list (in alphabetical order) a set of control options that are most relevant for dynamic time series modeling, along with their descriptions. Each control option has a manual page that can be accessed in the usual way, e.g., ?control.compute, with detailed information about the option. In addition, the list of options for each control argument and their default values can be obtained with functions inla.set.control.default(), where CONTROL refers to the control argument. For example, for the argument control.compute, the list of options and default values can be obtained with inla.set.control.compute.default(). More details on these, as well as other inla() control options, can be seen on the R-INLA website.

TABLE 14.1: Common control options – a quick lookup.
Options Descriptions Used in Chapter
control.compute Specify what to actually compute during model fitting Ch. 5-7
control.family Specify model likelihood Ch. 3-12
control.fixed Options on fixed effects in a model Ch. 3-4
control.group Defines the order of the model, as in AR(p) Ch. 3, 8
control.inla Options on how the method is used in model fitting Ch. 3, 12
control.lincomb Options on how to compute linear combinations Ch. 12
control.link Ch. 12
control.predictor Options on computing the linear predictor Ch. 3-12

Options for computing marginals

Often used options for computing various marginal distributions are shown in Table 14.2. We have used some of these options in various sections in the book.

TABLE 14.2: Functions on marginals
Function Description
inla.dmarginal Compute the density function
inla.pmarginal Compute the cumulative probability function
inla.qmarginal Compute a quantile
inla.rmarginal Draw a random sample
inla.hpdmarginal Compute the highest posterior density (HPD) credible interval
inla.smarginal Spline smoothing of the posterior marginal
inla.emarginal Compute the expected value of a function
inla.mmarginal Compute the posterior mode
inla.tmarginal Transform a marginal using a function
inla.zmarginal Compute summary statistics

Random effect specifications

R-INLA allows several specifications for handling random effects under different situations. Table 14.3 shows a collection of available effects from which a user may choose a suitable specification.

TABLE 14.3: Random Effects in R-INLA.
Name Description
iid Independent and identically distributed Gaussian random effect
z Classical specification of random effects
generic0 Generic specification (type 0)
generic1 Generic specification (type 1)
generic2 Generic specification (type 2)
generic3 Generic specification (type 3)
rw1 Random walk of order 1
rw2 Random walk of order 2
crw2 Continuous random walk of order 2
seasonal Seasonal variation with a given periodicity
ar1 Autoregressive model of order 1
ar Autoregressive model of arbitrary order
iid1d Correlated random effects of dimension 1
iid2d Correlated random effects of dimension
iid3d Correlated random effects of dimension 3
iid4d Correlated random effects of dimension 4
iid5d Correlated random effects of dimension 5

Prior specifications

Table 14.4 shows a list of priors available in R-INLA. This table is similar to Table 5.2 in Gómez-Rubio (2020). These specifications enable a user to set priors for latent effects or hyperparameters. More details are available on the R-INLA website.

TABLE 14.4: Summary of priors implemented in R-INLA.
Prior Description Parameters
normal Gaussian prior mean, precision
gaussian Gaussian prior mean, precision
loggamma log-Gamma prior shape, rate
logtnormal Truncated (positive) Gaussian prior mean, precision
logtgaussian Truncated (positive) Gaussian prior mean, precision
flat Flat (improper) prior on \(\theta\)
logflat Flat (improper prior) on \(\exp(\theta)\)
logiflat Flat (improper prior) on \(\exp(-\theta)\)
mvnorm Multivarite Normal prior
dirichlet Dirichlet prior \(\alpha\)
betacorrelation Beta prior for correlation \(a,~b\)
logitbeta Beta prior, logit-scale \(a,~ b\)
jeffreystdf Jeffreys prior
table User defined prior
expression User defined prior
Aitchison, John, and C. H. Ho. 1989. “The Multivariate Poisson-Log Normal Distribution.” Biometrika 76 (4): 643–53.
Aktekin, Tevfik, Nicholas G. Polson, and Refik Soyer. 2020. “A Family of Multivariate Non-Gaussian Time Series Models.” Journal of Time Series Analysis 41 (5): 691–721.
Andersson, Jonas. 2001. “On the Normal Inverse Gaussian Stochastic Volatility Model.” Journal of Business & Economic Statistics 19 (1): 44–54.
Baker, Stuart G. 1994. “The Multinomial-Poisson Transformation.” Journal of the Royal Statistical Society: Series D (The Statistician) 43 (4): 495–504.
Bakka, Haakon, Håvard Rue, Geir-Arne Fuglstad, Andrea Riebler, David Bolin, Janine Illian, Elias Krainski, Daniel Simpson, and Finn Lindgren. 2018. “Spatial Modeling with R-INLA: A Review.” Wiley Interdisciplinary Reviews: Computational Statistics 10 (6): e1443.
Barndorff-Nielsen, Ole E. 1997. “Normal Inverse Gaussian Distributions and Stochastic Volatility Modelling.” Scandinavian Journal of Statistics 24 (1): 1–13.
Barndorff-Nielsen, Ole E., and Geert Schou. 1973. “On the Parameterization of Autoregressive Models by Partial Autocorrelations.” Journal of Multivariate Analysis 3 (4): 408–19.
Berry, Donald A. 1996. Statistics: A Bayesian Perspective. Belmont, CA: Duxbury Press.
Berry, Lindsay R., and Mike West. 2020. “Bayesian Forecasting of Many Count-Valued Time Series.” Journal of Business & Economic Statistics 38 (4): 872–87.
Besag, Julian. 1974. “Spatial Interaction and the Statistical Analysis of Lattice Systems.” Journal of the Royal Statistical Society: Series B (Methodological) 36 (2): 192–225.
Besag, Julian, Jeremy York, and Annie Mollié. 1991. “Bayesian Image Restoration, with Two Applications in Spatial Statistics.” Annals of the Institute of Statistical Mathematics 43 (1): 1–20.
Blangiardo, Marta, Michela Cameletti, Gianluca Baio, and Håvard Rue. 2013. “Spatial and Spatio-Temporal Models with R-INLA.” Spatial and Spatio-Temporal Epidemiology 4: 33–49.
Blei, David M., Alp Kucukelbir, and Jon D. McAuliffe. 2017. “Variational Inference: A Review for Statisticians.” Journal of the American Statistical Association 112 (518): 859–77.
Boehmke, Bradley C. 2016. Data Wrangling with r. Switzerland: Springer International Publishing.
Bollerslev, Tim. 1986. “Generalized Autoregressive Conditional Heteroscedasticity.” Journal of Econometrics 31 (3): 307–27.
Cargnoni, Claudia, Peter Müller, and Mike West. 1997. “Bayesian Forecasting of Multinomial Time Series Through Conditionally Gaussian Dynamic Models.” Journal of the American Statistical Association 92 (438): 640–47.
Chen, Sean X., and Jun S. Liu. 1997. “Statistical Applications of the Poisson-Binomial and Conditional Bernoulli Distributions.” Statistica Sinica 7: 875–92.
Chib, Siddhartha. 1995. “Marginal Likelihood from the Gibbs Output.” Journal of the American Statistical Association 90 (432): 1313–21.
Chib, Siddhartha, and Rainer Winkelmann. 2001. “Markov Chain Monte Carlo Analysis of Correlated Count Data.” Journal of Business & Economic Statistics 19 (4): 428–35.
Cox, David R., Gudmundur Gudmundsson, Georg Lindgren, Lennart Bondesson, Erik Harsaae, Petter Laake, Katarina Juselius, and Steffen L Lauritzen. 1981. “Statistical Analysis of Time Series: Some Recent Developments [with Discussion and Reply].” Scandinavian Journal of Statistics 8: 93–115.
Cressie, Noel. 2015. Statistics for Spatial Data. New York: John Wiley & Sons.
De Bruijn, Nicolaas Govert. 1981. Asymptotic Methods in Analysis. New York: Dover Publications.
Dutta, Chiranjit, Nalini Ravishanker, and Sumanta Basu. 2022. “Modeling Multivariate Positive-Valued Time Series Using R-INLA.” Arxiv.
Ebrahimi, Nader, Ehsan S. Soofi, and Refik Soyer. 2010. “On the Sample Information about Parameter and Prediction.” Statistical Science 25 (3): 348–67.
Engle, Robert F. 1982. “Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation.” Econometrica: Journal of the Econometric Society, 987–1007.
Fahrmeir, Ludwig, and Gerhard Tutz. 2001. “Models for Multicategorical Responses: Multivariate Extensions of Generalized Linear Models.” In Multivariate Statistical Modelling Based on Generalized Linear Models, 69–137. Springer.
Fuentes, Montserrat, Li Chen, and Jerry M. Davis. 2008. “A Class of Nonseparable and Nonstationary Spatial Temporal Covariance Functions.” Environmetrics: The Official Journal of the International Environmetrics Society 19 (5): 487–507.
Fuglstad, Geir-Arne, Daniel Simpson, Finn Lindgren, and Håvard Rue. 2019. “Constructing Priors That Penalize the Complexity of Gaussian Random Fields.” Journal of the American Statistical Association 114 (525): 445–52.
Gamerman, Dani. 1998. “Markov Chain Monte Carlo for Dynamic Generalised Linear Models.” Biometrika 85 (1): 215–27.
Gamerman, D., and F. H. Lopes. 2006. Markov Chain Monte Carlo: Stochastic Simulation for Bayesian Inference. New York: Chapman & Hall/CRC.
Gamerman, D., and Helio S. Migon. 1993. “Dynamic Hierarchical Models.” Journal of the Royal Statistical Society: Series B (Methodological) 55 (3): 629–42.
Gelfand, A. E., and Dipak K. Dey. 1994. “Bayesian Model Choice: Asymptotics and Exact Calculations.” Journal of the Royal Statistical Society: Series B (Methodological) 56 (3): 501–14.
Gelfand, A. E., and A. F. M. Smith. 1990. “Sampling-Based Approaches to Calculating Marginal Densities.” Journal of the American Statistical Association 85: 398–409.
Gelman, Andrew, and Jennifer Hill. 2006. Data Analysis Using Regression and Multilevel/Hierarchical Models. New York: Cambridge University Press.
Gelman, Andrew, Jessica Hwang, and Aki Vehtari. 2014. “Understanding Predictive Information Criteria for Bayesian Models.” Statistics and Computing 24 (6): 997–1016.
Gerte, Raymond, Karthik C. Konduri, Nalini Ravishanker, Amit Mondal, and Naveen Eluru. 2019. “Understanding the Relationships Between Demand for Shared Ride Modes: Case Study Using Open Data from New York City.” Transportation Research Record 2673 (12): 30–39.
Gómez-Rubio, Virgilio. 2020. Bayesian Inference with INLA. Boca Raton, Florida: CRC Press.
Gómez-Rubio, Virgilio, Roger S Bivand, and Håvard Rue. 2020. “Bayesian Model Averaging with the Integrated Nested Laplace Approximation.” Econometrics 8 (2): 23.
Gómez-Rubio, Virgilio, and Håvard Rue. 2018. “Markov Chain Monte Carlo with the Integrated Nested Laplace Approximation.” Statistics and Computing 28 (5): 1033–51.
Guimaraes, Paulo. 2004. “Understanding the Multinomial-Poisson Transformation.” The Stata Journal 4 (3): 265–73.
Harvey, Andrew, and S. J. Koopman. 2014. “Structural Time Series Models.” Wiley StatsRef: Statistics Reference Online.
Held, Leonhard, Birgit Schrödle, and Håvard Rue. 2010. “Posterior and Cross-Validatory Predictive Checks: A Comparison of MCMC and INLA.” In Statistical Modelling and Regression Structures, 91–110. Springer.
Hu, Shan, John N. Ivan, Nalini Ravishanker, and James Mooradian. 2013. “Temporal Modeling of Highway Crash Counts for Senior and Non-Senior Drivers.” Accident Analysis & Prevention 50: 1003–13.
Hubin, Aliaksandr, and Geir Storvik. 2016. “Estimating the Marginal Likelihood with Integrated Nested Laplace Approximation (INLA).” https://arxiv.org/abs/1611.01450.
Hyndman, Rob J, and Yeasmin Khandakar. 2008. “Automatic Time Series Forecasting: The Forecast Package for R.” Journal of Statistical Software 26 (3): 1–22. https://www.jstatsoft.org/article/view/v027i03.
Hyndman, Rob, George Athanasopoulos, Christoph Bergmeir, Gabriel Caceres, Leanne Chhay, Mitchell O’Hara-Wild, Fotios Petropoulos, Slava Razbash, Earo Wang, and Farah Yasmeen. 2021. forecast: Forecasting Functions for Time Series and Linear Models. https://pkg.robjhyndman.com/forecast/.
Jacquier, Eric, Nicholas G Polson, and Peter E Rossi. 1994. “Bayesian Analysis of Stochastic Volatility Models.” Journal of Business & Economic Statistics, 371–89.
Jeffreys, Harold. 1935. “Some Tests of Significance, Treated by the Theory of Probability.” In Mathematical Proceedings of the Cambridge Philosophical Society, 31:203–22. 2. Cambridge University Press.
Jordan, Michael I., Zoubin Ghahramani, Tommi S. Jaakkola, and Lawrence K. Saul. 1998. “An Introduction to Variational Methods for Graphical Models.” In Learning in Graphical Models, 105–61. Springer.
Kalman, Rudolph Emil. 1960. “A New Approach to Linear Filtering and Prediction Problems.” Trans. ASME J. Basic Engineering 83.
Kass, Robert E., and Adrian E. Raftery. 1995. “Bayes Factors.” Journal of the American Statistical Association 90 (430): 773–95.
Kim, Sangjoon, Neil Shephard, and Siddhartha Chib. 1998. “Stochastic Volatility: Likelihood Inference and Comparison with ARCH Models.” The Review of Economic Studies 65 (3): 361–93.
Knorr-Held, Leonhard. 2000. “Bayesian Modelling of Inseparable Space-Time Variation in Disease Risk.” Statistics in Medicine 19 (17-18): 2555–67.
Korobilis, Dimitris, and Gary Koop. 2018. “Variational Bayes Inference in High-Dimensional Time-Varying Parameter Models.”
Krainski, Elias T., Virgilio Gómez-Rubio, Haakon Bakka, Amanda Lenzi, Daniela Castro-Camilo, Daniel Simpson, Finn Lindgren, and Håvard Rue. 2018. Advanced Spatial Modeling with Stochastic Partial Differential Equations Using r and INLA. New York: CRC Press.
Kullback, Solomon. 1959. Information Theory and Statistics. New York: John Wiley & Sons.
Kullback, Solomon, and Richard A. Leibler. 1951. “On Information and Sufficiency.” The Annals of Mathematical Statistics 22 (1): 79–86.
Lauritzen, Steffen L. 1996. Graphical Models. Vol. Oxford Statistical Science Series 17. Oxford: Clarendon Press.
Lee, Jarod Y .L., Peter J. Green, and Louise M. Ryan. 2017. “On the Poisson Trick’ and Its Extensions for Fitting Multinomial Regression Models.” arXiv Preprint arXiv:1707.08538.
Lindgren, Finn, and Håvard Rue. 2015. “Bayesian Spatial Modelling with R-INLA.” Journal of Statistical Software 63 (19): 1–25.
Lindley, Dennis V. 1961. “The Use of Prior Probability Distributions in Statistical Inference and Decision.” In Proc. 4th Berkeley Symp. On Math. Stat. And Prob, 453–68.
———. 1980. “Approximate Bayesian Methods.” Trabajos de Estadı́stica y de Investigación Operativa 31 (1): 223–45.
———. 1983. “Theory and Practice of Bayesian Statistics.” Journal of the Royal Statistical Society. Series D (The Statistician) 32 (1/2): 1–11.
Lunn, David J, Andrew Thomas, Nicky Best, and David Spiegelhalter. 2000. “WinBUGS-a Bayesian Modelling Framework: Concepts, Structure, and Extensibility.” Statistics and Computing 10 (4): 325–37.
Lütkepohl, Helmut. 2013. Introduction to Multiple Time Series Analysis. Heidelberg: Springer Berlin.
Marin, Jean-Michel, Pierre Pudlo, Christian P. Robert, and Robin J. Ryder. 2012. “Approximate Bayesian Computational Methods.” Statistics and Computing 22 (6): 1167–80.
Marriott, John, Nalini Ravishanker, Alan E. Gelfand, and Jeffrey S. Pai. 1996. “Bayesian Analysis of ARMA Processes: Complete Sampling-Based Inference Under Exact Likelihoods.” Bayesian Analysis in Statistics and Econometrics, 243–56.
Martino, Sara, Kjersti Aas, Ola Lindqvist, Linda R. Neef, and Håvard Rue. 2011. “Estimating Stochastic Volatility Models Using Integrated Nested Laplace Approximations.” The European Journal of Finance 17 (7): 487–503.
Martino, Sara, and Andrea Riebler. 2014. “Integrated Nested Laplace Approximations (INLA).” Wiley StatsRef: Statistics Reference Online, 1–19.
Martins, Thiago G., Daniel Simpson, Finn Lindgren, and Håvard Rue. 2013. “Bayesian Computing with INLA: New Features.” Computational Statistics & Data Analysis 67: 68–83.
McCullagh, Peter, and J. A. Nelder. 1989. Generalized Linear Models. 2nd ed. London: Chapman & Hall.
Monahan, John F. 1984. “A Note on Enforcing Stationarity in Autoregressive-Moving Average Models.” Biometrika 71 (2): 403–4.
Moraga, Paula. 2019. Geospatial Health Data: Modeling and Visualization with r-INLA and Shiny. Boca Raton, Florida: CRC Press.
Musa, John D. 1979. “Software Reliability Data.” IEEE Comput. Soc. Repository.
Newton, Michael A., and Adrian E. Raftery. 1994. “Approximate Bayesian Inference with the Weighted Likelihood Bootstrap.” Journal of the Royal Statistical Society: Series B (Methodological) 56 (1): 3–26.
Palmı́-Perales, Francisco, Virgilio Gómez-Rubio, and Miguel A Martinez-Beneito. 2021. “Bayesian Multivariate Spatial Models for Lattice Data with INLA.” Journal of Statistical Software 98: 1–29.
Petris, Giovanni. 2010. “An R Package for Dynamic Linear Models.” Journal of Statistical Software 36 (12): 1–16. http://www.jstatsoft.org/v36/i12/.
Plummer, Martyn et al. 2003. “JAGS: A Program for Analysis of Bayesian Graphical Models Using Gibbs Sampling.” In Proceedings of the 3rd International Workshop on Distributed Statistical Computing, 124:1–10. 125.10. Vienna, Austria.
Raman, Balaji, Kamal Sen, Venu Gorti, and Nalini Ravishanker. 2021. “Improving Promotional Effectiveness for Consumer Goods—a Dynamic Bayesian Approach.” Applied Stochastic Models in Business and Industry 37 (4): 823–33.
Raman, B., N. Ravishanker, R. Soyer, V. Gorti, and K. Sen. 2021. “Dynamic Bayesian Modeling of Count Time Series Using R-INLA.” Journal of the Indian Statistical Association 58 (2): 157–92.
RStudio Team. 2021. RStudio: Integrated Development Environment for r. Boston, MA: RStudio, PBC. http://www.rstudio.com/.
Rue, Håvard, and Leonhard Held. 2005. Gaussian Markov Random Fields: Theory and Applications. Boca Raton, Florida: Chapman & Hall/CRC.
Rue, Håvard, Sara Martino, and Nicholas Chopin. 2009. “Approximate Bayesian Inference for Latent Gaussian Models Using Integrated Nested Laplace Approximations (with Discussion).” Journal of the Royal Statistical Society, Series B 71: 319–92.
Ruiz-Cárdenas, Ramiro, Elias T. Krainski, and Håvard Rue. 2012. “Direct Fitting of Dynamic Models Using Integrated Nested Laplace Approximations—INLA.” Computational Statistics & Data Analysis 56 (6): 1808–28.
Seppä, Karri, Håvard Rue, Timo Hakulinen, Esa Läärä, Mikko J. Sillanpää, and Janne Pitkäniemi. 2019. “Estimating Multilevel Regional Variation in Excess Mortality of Cancer Patients Using Integrated Nested Laplace Approximation.” Statistics in Medicine 38 (5): 778–91.
Serhiyenko, Volodymyr. 2015. “Dynamic Modeling of Multivariate Counts – Fitting, Diagnostics, and Applications.” Ph.D. Thesis, University of Connecticut.
Serhiyenko, Volodymyr, Sha A. Mamun, John N. Ivan, and Nalini Ravishanker. 2016. “Fast Bayesian Inference for Modeling Multivariate Crash Counts.” Analytic Methods in Accident Research 9: 44–53.
Serhiyenko, Volodymyr, Nalini Ravishanker, and Rajkumar Venkatesan. 2015. “Approximate Bayesian Estimation for Multivariate Count Time Series Models.” In Ordered Data Analysis, Modeling and Health Research Methods, 155–67. Springer.
———. 2018. “Multi-Stage Multivariate Modeling of Temporal Patterns in Prescription Counts for Competing Drugs in a Therapeutic Category.” Applied Stochastic Models in Business and Industry 34 (1): 61–78.
Shumway, Robert H., and David S. Stoffer. 2017. Time Series Analysis and Its Applications: With r Examples. Springer Texts in Statistics. New York: Springer International Publishing.
Singpurwalla, Nozer D., and Refik Soyer. 1992. “Non-Homogeneous Autoregressive Processes for Tracking (Software) Reliability Growth, and Their Bayesian Analysis.” Journal of the Royal Statistical Society: Series B (Methodological) 54 (1): 145–56.
Soyer, R., T. Aktekin, and B. Kim. 2016. “Bayesian Modeling of Time Series of Counts with Business Applications.” In Handbook of Discrete-Valued Time Series, 265–84. Chapman; Hall/CRC: New York.
Soyer, Refik, and Minje Sung. 2013. “Bayesian Dynamic Probit Models for the Analysis of Longitudinal Data.” Computational Statistics & Data Analysis 68: 388–98.
Soyer, Refik, and Di Zhang. 2021. “Bayesian Modeling of Multivariate Time Series of Counts.” Wiley Interdisciplinary Reviews: Computational Statistics, e1559.
Spiegelhalter, David J, Nicola G Best, Bradley P Carlin, and Angelika Van Der Linde. 2002. “Bayesian Measures of Model Complexity and Fit.” Journal of the Royal Statistical Society: Series B (Statistical Methodology) 64 (4): 583–639.
Tanner, M., and W. H. Wong. 1987. “The Calculation of Posterior Distributions by Data Augmentation (with Discussion).” Journal of the American Statistical Association 82: 528–54.
Taylor, Stephen John. 1982. “Financial Returns Modelled by the Product of Two Stochastic Processes – a Study of the Daily Sugar Prices 1961-75.” Time Series Analysis: Theory and Practice 1: 203–26.
Team, R Core. 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Tierney, Luke, and Joseph B. Kadane. 1986. “Accurate Approximations for Posterior Moments and Marginal Densities.” Journal of the American Statistical Association 81 (393): 82–86.
Toman, Patrick, Jingyue Zhang, Nalini Ravishanker, and Karthik C. Konduri. 2020. “Spatiotemporal Analysis of Ridesourcing and Taxi Demand by Taxi Zones in New York City.” Journal of the Indian Society for Probability and Statistics 22: 231–49.
Tsay, Ruey S. 2005. Analysis of Financial Time Series. New York: John Wiley & Sons.
Van Niekerk, Janet, Haakon Bakka, Håvard Rue, and Loaf Schenk. 2019. “New Frontiers in Bayesian Modeling Using the INLA Package in R.” arXiv Preprint arXiv:1907.10426.
Wang, K., J. N. Ivan, N. Ravishanker, and E. Jackson. 2017. “Multivariate Poisson Lognormal Modeling of Crashes by Type and Severity on Rural Two Lane Highways.” Accident Analysis & Prevention 99: 6–19.
Wang, Xiaofeng, Yuryan Yue, and Julian J. Faraway. 2018. Bayesian Regression Modeling with INLA. New York: Chapman; Hall/CRC.
Wang, Y., J. Zou, and N. Ravishanker. 2021. “Modeling Correlated Count Time Series Using R-INLA.” Technical Report.
Watanabe, Sumio, and Manfred Opper. 2010. “Asymptotic Equivalence of Bayes Cross Validation and Widely Applicable Information Criterion in Singular Learning Theory.” Journal of Machine Learning Research 11 (12).
West, Mike, and Jeff Harrison. 1997. Bayesian Forecasting and Dynamic Models. 2nd ed. New York: Springer-Verlag.
Wichern, D. W., and R. H. Jones. 1977. “Assessing the Impact of Market Disturbances Using Intervention Analysis.” Management Science 24 (3): 329–37.
Wickham, Hadley. 2016. Ggplot2: Elegant Graphics for Data Analysis. New York: Springer-Verlag. https://ggplot2.tidyverse.org.
Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.
Wikle, Christopher K., Mark L. Berliner, and Noel Cressie. 1998. “Hierarchical Bayesian Space-Time Models.” Environmental and Ecological Statistics 5 (2): 117–54.
Wood, Simon N. 2020. “Simplified Integrated Nested Laplace Approximation.” Biometrika 107 (1): 223–30.
Xie, Yihui. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. Boca Raton, Florida: CRC Press.

References

Gómez-Rubio, Virgilio. 2020. Bayesian Inference with INLA. Boca Raton, Florida: CRC Press.