vhar_lm | R Documentation |
This function fits VHAR using OLS method.
vhar_lm(
y,
har = c(5, 22),
include_mean = TRUE,
method = c("nor", "chol", "qr")
)
## S3 method for class 'vharlse'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'vharlse'
logLik(object, ...)
## S3 method for class 'vharlse'
AIC(object, ...)
## S3 method for class 'vharlse'
BIC(object, ...)
is.vharlse(x)
## S3 method for class 'vharlse'
knit_print(x, ...)
y |
Time series data of which columns indicate the variables |
har |
Numeric vector for weekly and monthly order. By default, |
include_mean |
Add constant term (Default: |
method |
Method to solve linear equation system.
( |
x |
Any object |
digits |
digit option to print |
... |
not used |
object |
A |
For VHAR model
Y_{t} = \Phi^{(d)} Y_{t - 1} + \Phi^{(w)} Y_{t - 1}^{(w)} + \Phi^{(m)} Y_{t - 1}^{(m)} + \epsilon_t
the function gives basic values.
vhar_lm()
returns an object named vharlse
class.
It is a list with the following components:
Coefficient Matrix
Fitted response values
Residuals
LS estimate for covariance matrix
Numer of Coefficients
Dimension of the data
Sample size used when training = totobs
- month
Multivariate response matrix
3 (The number of terms. vharlse
contains this element for usage in other functions.)
Order for weekly term
Order for monthly term
Total number of the observation
Process: VHAR
include constant term (const
) or not (none
)
VHAR linear transformation matrix
Design matrix of VAR(month
)
Raw input
Solving method
Matched call
It is also a bvharmod
class.
Baek, C. and Park, M. (2021). Sparse vector heterogeneous autoregressive modeling for realized volatility. J. Korean Stat. Soc. 50, 495-510.
Bubák, V., Kočenda, E., & Žikeš, F. (2011). Volatility transmission in emerging European foreign exchange markets. Journal of Banking & Finance, 35(11), 2829-2841.
Corsi, F. (2008). A Simple Approximate Long-Memory Model of Realized Volatility. Journal of Financial Econometrics, 7(2), 174-196.
coef.vharlse()
, residuals.vharlse()
, and fitted.vharlse()
summary.vharlse()
to summarize VHAR model
# Perform the function using etf_vix dataset
fit <- vhar_lm(y = etf_vix)
class(fit)
str(fit)
# Extract coef, fitted values, and residuals
coef(fit)
head(residuals(fit))
head(fitted(fit))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.