View source: R/gets-base-source.R
arx | R Documentation |
Estimation by OLS, two-step OLS if a variance specification is specified: In the first the mean specification (AR-X) is estimated, whereas in the second step the log-variance specification (log-ARCH-X) is estimated.
The AR-X mean specification can contain an intercept, AR-terms, lagged moving averages of the regressand and other conditioning covariates ('X'). The log-variance specification can contain log-ARCH terms, asymmetry or 'leverage' terms, log(EqWMA) where EqWMA is a lagged equally weighted moving average of past squared residuals (a volatility proxy) and other conditioning covariates ('X').
arx(y, mc=TRUE, ar=NULL, ewma=NULL, mxreg=NULL, vc=FALSE, arch=NULL, asym=NULL, log.ewma=NULL, vxreg=NULL, zero.adj=0.1, vc.adj=TRUE, vcov.type=c("ordinary", "white", "newey-west"), qstat.options=NULL, normality.JarqueB=FALSE, user.estimator=NULL, user.diagnostics=NULL, tol=1e-07, LAPACK=FALSE, singular.ok=TRUE, plot=NULL)
y |
numeric vector, time-series or |
mc |
logical. |
ar |
either |
ewma |
either |
mxreg |
either |
vc |
logical. |
arch |
either |
asym |
either |
log.ewma |
either |
vxreg |
either |
zero.adj |
numeric value between 0 and 1. The quantile adjustment for zero values. The default 0.1 means the zero residuals are replaced by the 10 percent quantile of the absolute residuals before taking the logarithm |
vc.adj |
logical. If |
vcov.type |
character vector, "ordinary" (default), "white" or "newey-west". If "ordinary", then the ordinary variance-covariance matrix is used for inference. If "white", then the White (1980) heteroscedasticity-robust matrix is used. If "newey-west", then the Newey and West (1987) heteroscedasticity and autocorrelation-robust matrix is used |
qstat.options |
|
normality.JarqueB |
|
user.estimator |
|
user.diagnostics |
|
tol |
numeric value ( |
LAPACK |
logical. If |
singular.ok |
logical. If |
plot |
|
For an overview of the AR-X model with log-ARCH-X errors, see Pretis, Reade and Sucarrat (2018): doi: 10.18637/jss.v086.i03.
The arguments user.estimator
and user.diagnostics
enables the specification of user-defined estimators and user-defined diagnostics. To this end, the principles of the same arguments in getsFun
are followed, see its documentation under "Details", and Sucarrat (2020): https://journal.r-project.org/archive/2021/RJ-2021-024/.
A list of class 'arx'
Jonas Kurle: | https://www.jonaskurle.com/ | |
Moritz Schwarz: | https://www.inet.ox.ac.uk/people/moritz-schwarz/ | |
Genaro Sucarrat: | http://www.sucarrat.net/ | |
C. Jarque and A. Bera (1980): 'Efficient Tests for Normality, Homoscedasticity and Serial Independence'. Economics Letters 6, pp. 255-259. doi: 10.1016/0165-1765(80)90024-5
Felix Pretis, James Reade and Genaro Sucarrat (2018): 'Automated General-to-Specific (GETS) Regression Modeling and Indicator Saturation for Outliers and Structural Breaks'. Journal of Statistical Software 86, Number 3, pp. 1-44. doi: 10.18637/jss.v086.i03
Genaro Sucarrat (2020): 'User-Specified General-to-Specific and Indicator Saturation Methods'. The R Journal 12:2, pages 388-401. https://journal.r-project.org/archive/2021/RJ-2021-024/
Halbert White (1980): 'A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity', Econometrica 48, pp. 817-838.
Whitney K. Newey and Kenned D. West (1987): 'A Simple, Positive Semi-Definite, Heteroskedasticity and Autocorrelation Consistent Covariance Matrix', Econometrica 55, pp. 703-708.
Extraction functions (mostly S3 methods): coef.arx
, ES
, fitted.arx
, plot.arx
,
print.arx
, recursive
, residuals.arx
, sigma.arx
, rsquared
,
summary.arx
, VaR
and vcov.arx
Related functions: getsm
, getsv
, isat
##Simulate from an AR(1): set.seed(123) y <- arima.sim(list(ar=0.4), 70) ##estimate an AR(2) with intercept: arx(y, mc=TRUE, ar=1:2) ##Simulate four independent Gaussian regressors: xregs <- matrix(rnorm(4*70), 70, 4) ##estimate an AR(2) with intercept and four conditioning ##regressors in the mean: arx(y, ar=1:2, mxreg=xregs) ##estimate a log-variance specification with a log-ARCH(4) ##structure: arx(y, mc=FALSE, arch=1:4) ##estimate a log-variance specification with a log-ARCH(4) ##structure and an asymmetry/leverage term: arx(y, mc=FALSE, arch=1:4, asym=1) ##estimate a log-variance specification with a log-ARCH(4) ##structure, an asymmetry or leverage term, a 10-period log(EWMA) as ##volatility proxy, and the log of the squareds of the conditioning ##regressors in the log-variance specification: arx(y, mc=FALSE, arch=1:4, asym=1, log.ewma=list(length=10), vxreg=log(xregs^2)) ##estimate an AR(2) with intercept and four conditioning regressors ##in the mean, and a log-variance specification with a log-ARCH(4) ##structure, an asymmetry or leverage term, a 10-period log(EWMA) as ##volatility proxy, and the log of the squareds of the conditioning ##regressors in the log-variance specification: arx(y, ar=1:2, mxreg=xregs, arch=1:4, asym=1, log.ewma=list(length=10), vxreg=log(xregs^2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.