Bayesian Non-Parametric Dependent Models for Time-Indexed Functional Data

Estimates a collection of time-indexed functions under either of Gaussian process (GP) or intrinsic Gaussian Markov random field (iGMRF) prior formulations where a Dirichlet process mixture allows sub-groupings of the functions to share the same covariance or precision parameters. The GP and iGMRF formulations both support any number of additive covariance or precision terms, respectively, expressing either or both of multiple trend and seasonality.



  • new release on CRAN.

  • performs Bayesian non-parametric modeling on a (rectangular) set of functional data observations.

  • The collection of functions may be modeled under Gaussian process (GP) or intrinsic Gaussian Markov

  • random field (iGMRF) prior formulations.

  • The covariance and precision parameters of the GP and iGMRF formulations, respectively, are placed under

  • a Dirichlet process (DP) prior to allow the data to discover dependence among the estimated functions

  • where co-clusters functions are drawn from distributions sharing the same covariance and precision parameters.

  • the GP prior formulation is invoked with gpdpgrow()

  • any number of additive covariance terms may be specified with gpdpgrow().

  • for example, if there are 4 terms, then the input variable, gp_cov = c("rq","se","sn","sn")

  • if the covariance functions for the 4 terms are structured as (rational quadratic, squared exponential,

  • seasonal, seasonal), respectively. The input variable, sn_order = c(3,12), sets the order for each seasonality

  • term; in this case, 3 months and 12 months (assuming the data time scale is denoted by month).

  • the iGMRF prior is invoked with gmrfdpgrow(), also allowing any number of additive precision terms

  • the input variable, q_type = c("tr","sn","sn"), denotes "tr' = trend, and "sn" = seasonality terms.

  • input, q_order = c(2,3,12) denotes the order for the associated term; for example, the second term

  • is specified as seasonal of order = 3 (e.g. months).


  • version 0.1 launched on CRAN.
  • replaced srand() with arma_rng::set_seed_random() to initialize random seed for RcppArmadillo.
  • removed use of arma::sp_mat (sparse matrix) formulation for normalized CAR adjacency matrix from gmrfdpgrow() due to memory initialization issue in RcppArmadillo.
  • removed use of arma_rng::set_seed_random() to avoid warning about setting R seed from C++.
  • Minor changes in anticipation of ggplot2 1.1.0
  • return pop_plot and samp_plot ggplot2 objects in gen_informative_sample() that plot generated synthetic functions in the population and sample, respectively.
  • employ uniform(0,1) starting values in the MCMC sampler when co-sampling the GP functions, bb, in gpdpgrow() to prevent numerical instability producing NaNs in auxclusterstep() for sampling cluster assignments under Debian Linux.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.13 by Terrance Savitsky, a year ago

Browse source code at

Authors: Terrance Savitsky

Documentation:   PDF Manual  

Task views: Functional Data Analysis

GPL (>= 3) license

Imports Matrix, spam, mvtnorm, ggplot2, reshape2

Depends on Rcpp

Suggests testthat

Linking to Rcpp, RcppArmadillo

See at CRAN