plot_midas_coef.midas_r: Plot MIDAS coefficients

Description Usage Arguments Details Value Author(s) Examples

View source: R/midas_r_methods.R

Description

Plots MIDAS coefficients of a MIDAS regression for a selected term.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_midas_coef(x, term_name, title, ...)

## S3 method for class 'midas_r'
plot_midas_coef(
  x,
  term_name = NULL,
  title = NULL,
  vcov. = sandwich,
  unrestricted = x$unrestricted,
  ...
)

Arguments

x

midas_r object

term_name

the term name for which the coefficients are plotted. Default is NULL, which selects the first MIDAS term

title

the title string of the graph. The default is NULL for the default title.

...

additional arguments passed to vcov.

vcov.

the covariance matrix to calculate the standard deviation of the cofficients

unrestricted

the unrestricted model, the default is unrestricted model from the x object. Set NULL to plot only the weights.

Details

Plots MIDAS coefficients of a selected MIDAS regression term together with corresponding MIDAS coefficients and their confidence intervals of unrestricted MIDAS regression

Value

a data frame with restricted MIDAS coefficients, unrestricted MIDAS coefficients and lower and upper confidence interval limits. The data frame is returned invisibly.

Author(s)

Virmantas Kvedaras, Vaidotas Zemlys

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("USrealgdp")
data("USunempr")

y <- diff(log(USrealgdp))
x <- window(diff(USunempr), start = 1949)
trend <- 1:length(y)

##24 high frequency lags of x included
mr <- midas_r(y ~ trend + fmls(x, 23, 12, nealmon), start = list(x = rep(0, 3)))

plot_midas_coef(mr)

Example output

Loading required package: sandwich
Loading required package: optimx

midasr documentation built on Feb. 23, 2021, 5:11 p.m.