SandwichNeweyWest | R Documentation |
HARModel
Objects
A method for extracting the Newey-West variance-covariance matrix for a HARModel
object
SandwichNeweyWest(object, lags)
object |
A |
lags |
An integer to denote the allowed autocorrelation. |
Usual values for lags
are 5 and T^0.25 rounding to the nearest integer.
This function is merely a method to implement code from the sandwich
package.
HACMatrix |
The Variance-Covariance matrix |
sandwich
package. https://CRAN.R-project.org/package=sandwich
set.seed(123) #Simulate a HAR process: HARSim = HARsimulate(iLength = 10000, vLags = c(1,5,22), vCoef = c(0., 0.36 , 0.28 , 0.28 ) , dSigma = 0.001) #Estimate the HAR process: HARModel = HARestimate(vRealizedMeasure = HARSim@Simulation, vLags = c(1,5,22)) SandwichNeweyWest(HARModel , lags = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.