gctsc: Fit a Copula-Based Count Time Series Model

View source: R/main.R

gctscR Documentation

Fit a Copula-Based Count Time Series Model

Description

Fits a Gaussian or Student–t copula model to univariate count time series with discrete marginals (Poisson, negative binomial, binomial/beta–binomial, and zero–inflated variants) and latent dependence specified via ARMA correlation structures.

Usage

gctsc(
  formula = NULL,
  data,
  marginal,
  cormat,
  method = c("TMET", "GHK", "CE"),
  c = 0.5,
  QMC = TRUE,
  pm = 30,
  start = NULL,
  family = c("t", "gaussian"),
  df = 10,
  options = gctsc.opts()
)

Arguments

formula

A formula (e.g., y ~ x1 + x2) or, for zero–inflated marginals, a named list list(mu = ..., pi0 = ...).

data

A data frame containing the response and covariates referenced in the formula(s).

marginal

A marginal model object such as poisson.marg, negbin.marg, zib.marg, or zibb.marg; must inherit class "marginal.gctsc".

cormat

A correlation structure such as arma.cormat; must inherit class "cormat.gctsc".

method

One of "TMET", "GHK", or "CE".

c

Smoothing constant used by CE only (ignored otherwise). Default is 0.5.

QMC

Logical; if TRUE, quasi–Monte Carlo integration is used for simulation–based methods.

pm

Integer specifying the truncated AR order used when approximating ARMA(p,q) by an AR representation (TMET only; relevant when q > 0). Default is 30

start

Optional numeric vector of starting values (marginal parameters followed by dependence parameters). If NULL, sensible starting values and bounds are constructed from marginal and cormat.

family

Copula family. One of "gaussian" or "t".

df

Degrees of freedom for the Student–t copula. Must be greater than 2. Required when family = "t". Ignored for the Gaussian copula.

options

Optional list of tuning and optimization controls. If NULL, defaults from gctsc.opts() are used (e.g., M = 1000, randomized seed). Any supplied fields override the defaults.

Details

The high-dimensional rectangle probability defining the copula likelihood is approximated using one of:

  • TMET (Time Series Minimax Exponential Tilting),

  • GHK (Geweke–Hajivassiliou–Keane simulation), or

  • CE (Continuous Extension).

The interface mirrors glm(). Zero–inflated marginals accept a named list of formulas, e.g., list(mu = y ~ x, pi0 = ~ z). Non–zero–inflated marginals accept a single formula or list(mu = ...).

Formulas. For zero–inflated marginals, if neither mu nor pi0 is supplied, both default to intercept–only models (mu ~ 1, pi0 ~ 1). If mu is supplied but pi0 is missing, pi0 ~ 1 is used.

Dependence. The ARMA parameters are encoded in cormat. Models must satisfy stationarity and invertibility conditions. ARMA(0,0) is not supported.

Method-specific notes. CE ignores QMC and options$M. GHK and TMET require options$M to be a positive integer. TMET additionally uses pm when q > 0.

Value

An object of class "gctsc" containing, among others:

  • coef: parameter estimates,

  • maximum: approximate log–likelihood at the optimum,

  • se: standard errors when available,

  • terms, model, call: model metadata.

References

Nguyen, Q. N., & De Oliveira, V. (2026). Likelihood Inference in Gaussian Copula Models for Count Time Series via Minimax Exponential Tilting Journal of Computational Statistics and Data Analysis.

Nguyen, Q. N., & De Oliveira, V. (2026). Scalable Likelihood Inference for Student–t Copula Count Time Series. Manuscript in preparation.

Nguyen, Q. N., & De Oliveira, V. (2026). Approximating Gaussian copula models for count time series: Connecting the distributional transform and a continuous extension. Journal of Applied Statistics.

See Also

arma.cormat, poisson.marg, zib.marg, zibb.marg, gctsc.opts

Examples

## Example 1: Gaussian copula, Poisson marginal, AR(1)
set.seed(42)
n <- 500
sim_dat <- sim_poisson(mu = 10, tau = 0.3, arma_order = c(1, 0),
                       nsim = n, family = "gaussian")

dat <- data.frame(y = sim_dat$y)

fit_gauss <- gctsc(
  y ~ 1,
  data = dat,
  marginal = poisson.marg(lambda.lower = 0),
  cormat = arma.cormat(p = 1, q = 0), family = "gaussian",
  method = "CE",
  options = gctsc.opts(M = 1000, seed = 42)
)
summary(fit_gauss)

## Example 2: Student--t copula
sim_dat_t <- sim_poisson(mu = 10, tau = 0.3, arma_order = c(1, 0),
                         nsim = 500, family = "t", df = 10)

dat_t <- data.frame(y = sim_dat_t$y)

fit_t <- gctsc(
  y ~ 1,
  data = dat_t,
  marginal = poisson.marg(lambda.lower = 0),
  cormat = arma.cormat(p = 1, q = 0), family ="t",
  df= 10, method = "CE",
  options = gctsc.opts(M = 1000, seed = 42)
)
summary(fit_t)


gctsc documentation built on March 20, 2026, 9:11 a.m.