factors: Extractor Functions for Dynamic Factor Models

Description Usage Arguments Examples

View source: R/dfm-methods.R

Description

predict extracts the predicted values of model. adjusted returns the original series with the predicted values substituted if missing. factors return the factor(s) of the model.

Usage

1
2
3
4
5
6
factors(object)

adjusted(object)

## S3 method for class 'dfm'
predict(object, ...)

Arguments

object

object of class "dfm"

...

unused, to comply with generic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# predict vs. adjusted
library(tsbox)
dta0 <- ts_seas(cbind(mdeaths, fdeaths))  # seasonally adjust
dta <- dta0
dta[1:10, 2] <- NA

m <- dfm(dta)
ts_plot(predict(m)[, 'fdeaths'], dta0[, 'fdeaths'])
ts_plot(adjusted(m)[, 'fdeaths'], dta0[, 'fdeaths'])

## End(Not run)

srlanalytics/bdfm documentation built on Sept. 21, 2020, 10:45 p.m.