PeriodicBJFilter-class {pcts} | R Documentation |
Class PeriodicBJFilter
Description
A class for filters following the Box-Jenkins sign convention
Objects from the Class
Objects can be created by calls of the form new("PeriodicBJFilter", coef, order, ...)
.
Slots
coef
:Object of class
"matrix"
~~order
:Object of class
"numeric"
~~
Extends
Class "PeriodicMonicFilterSpec"
, directly.
Class "VirtualBJFilter"
, directly.
Class "VirtualMonicFilterSpec"
, by class "PeriodicMonicFilterSpec", distance 2.
Class "VirtualMonicFilter"
, by class "VirtualBJFilter", distance 2.
Methods
- filterCoef
signature(object = "PeriodicBJFilter", convention = "character")
: ...- coerce
signature(from = "matrix", to = "PeriodicBJFilter")
: ...- coerce
signature(from = "PeriodicBJFilter", to = "PeriodicSPFilter")
: ...- coerce
signature(from = "PeriodicSPFilter", to = "PeriodicBJFilter")
: ...- filterPoly
signature(object = "PeriodicBJFilter")
: ...- filterPolyCoef
signature(object = "PeriodicBJFilter")
: ...- show
signature(object = "PeriodicBJFilter")
: ...
Author(s)
Georgi N. Boshnakov
See Also
filterCoef
for more details on the generics
Examples
## a toy filter of order c(3, 3, 3, 3) and 4 seasons
co <- matrix(c(1, 1, 0,
2, 2, 2,
3, 0, 0,
4, 4, 4), nrow = 4, ncol = 3)
## these are equivalent:
bj1 <- new("PeriodicBJFilter", coef = co)
bj1b <- new("PeriodicBJFilter", coef = co, order = 3)
bj1c <- new("PeriodicBJFilter", coef = co, order = c(3, 3, 3, 3))
identical(bj1b, bj1c) # TRUE
identical(bj1, bj1b) # FALSE but only because classbj1@order is "integer"
## a more refined spec. for the order:
show( new("PeriodicBJFilter", coef = co, order = c(2, 3, 1, 3)) )
## as()
show( as(co, "PeriodicBJFilter") )
show( as(co, "PeriodicSPFilter") )
## change the sign convention:
sp1 <- as(bj1, "PeriodicSPFilter")
## the two parameterisations have different signs:
bj1
sp1
## nevertheless, bj1 and sp1 represent the same filter
filterPoly(bj1)
filterPoly(sp1)
identical(filterPoly(bj1), filterPoly(sp1)) # TRUE
filterPolyCoef(bj1)
filterPolyCoef(sp1)
identical(filterPolyCoef(bj1), filterPolyCoef(sp1)) # TRUE
filterOrder(bj1)
nSeasons(bj1)