powered by
The function creates a Fourier form periodic component for given period and harmonics.
seasMod(p, h, m0, C0, backend = c("auto", "R", "cpp"))
An object of class "exdqlm" containing the following:
exdqlm
FF - \(q \times 1\) observational vector.
FF
GG - \(q \times q\) evolution matrix.
GG
m0 - \(q \times 1\) prior mean of the state vector.
m0
C0 - \(q \times q\) prior covariance matrix of the state vector.
C0
Numeric period.
Numeric vector of harmonics to be included.
Optional numeric prior mean. Defaults to \(q \times 1\) vector of zeros where \(q\) is the dimension of the period component.
Optional numeric prior covariance. Defaults to matrix \(10^3 I_q\).
Backend selection for matrix construction: "auto" (default), "R", or "cpp".
"auto"
"R"
"cpp"
# 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))
Run the code above in your browser using DataLab