polytrendMod: Create an n-th order polynomial exDQLM component

View source: R/polytrendMod.R

polytrendModR Documentation

Create an n-th order polynomial exDQLM component

Description

The function creates an n-th order polynomial exDQLM component.

Usage

polytrendMod(order, m0, C0, backend = c("auto", "R", "cpp"))

Arguments

order

Numeric order n of the polynomial model.

m0

Optional numeric prior mean. Defaults to n \times 1 vector of zeros.

C0

Optional numeric prior covariance. Defaults to matrix 10^3 I_n.

backend

Backend selection for matrix construction: "auto" (default), "R", or "cpp".

Value

An object of class "exdqlm" containing the following:

  • FF - n \times 1 observational vector.

  • GG - n \times n evolution matrix.

  • m0 - n \times 1 prior mean of the state vector.

  • C0 - n \times n prior covariance matrix of the state vector.

Examples

# create a second order polynomial component
trend.comp = polytrendMod(2, rep(0, 2), 10*diag(2))


exdqlm documentation built on June 5, 2026, 1:06 a.m.