seasMod: Create Fourier representation of a periodic exDQLM component

View source: R/seasMod.R

seasModR Documentation

Create Fourier representation of a periodic exDQLM component

Description

The function creates a Fourier form periodic component for given period and harmonics.

Usage

seasMod(p, h, m0, C0, backend = c("auto", "R", "cpp"))

Arguments

p

Numeric period.

h

Numeric vector of harmonics to be included.

m0

Optional numeric prior mean. Defaults to q \times 1 vector of zeros where q is the dimension of the period component.

C0

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

backend

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

Value

An object of class "exdqlm" containing the following:

  • FF - q \times 1 observational vector.

  • GG - q \times q evolution matrix.

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

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

Examples

# create a seasonal component with first, second and fourth harmonics of a period of 365
seas.comp = seasMod(365, c(1, 2, 4), C0 = 10*diag(6))


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