Learn R Programming

exdqlm (version 0.4.0)

polytrendMod: 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"))

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.

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".

Examples

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

Run the code above in your browser using DataLab