| lmc_ar | R Documentation |
Performs a Local Monte Carlo (LMC) test of the null hypothesis
H_0: \phi_{p_0+1} = \cdots = \phi_p = 0 (i.e., that an SV(p_0)
model is sufficient against an SV(p) alternative).
lmc_ar(
y,
p_null,
p_alt,
J = 10,
N = 99,
burnin = 500,
del = 1e-10,
wDecay = FALSE,
Bartlett = FALSE,
Amat = NULL,
errorType = "Gaussian",
sigvMethod = "factored",
logNu = TRUE,
winsorize_eps = 0
)
y |
Numeric vector. Observed returns. |
p_null |
Integer. Order under the null hypothesis. |
p_alt |
Integer. Order under the alternative ( |
J |
Integer. Winsorizing parameter. Default 10. |
N |
Integer. Number of Monte Carlo replications. Default 99. |
burnin |
Integer. Burn-in for simulation. Default 500. |
del |
Numeric. Small constant for log transformation. Default |
wDecay |
Logical. Use decaying weights. Default |
Bartlett |
Logical. If |
Amat |
Weighting matrix specification. |
errorType |
Character. Error distribution of the return innovations:
|
sigvMethod |
Character. Method for |
logNu |
Logical. Use log-space for |
winsorize_eps |
Number of extreme autocovariance lags to winsorize (heavy-tail only). Default 0. |
When Bartlett = FALSE (default), the test statistic is
T \sum_{j=p_0+1}^{p} \hat\phi_j^2, i.e., the sum of squared extra
AR coefficients scaled by sample size.
When Bartlett = TRUE, the test statistic is based on the GMM-LRT
approach with a Bartlett kernel HAC weighting matrix:
S = T \times (M_{H_0} - M_{H_1}), where M denotes the
GMM criterion evaluated at the null and alternative estimates. Both the
observed and simulated test statistics are capped at 1e-10 when
negative; a negative observed statistic raises a warning (it indicates strong
evidence in favour of the null, since the alternative does not improve the
GMM criterion).
An object of class "svp_test", a list containing:
Test statistic from observed data (capped at 1e-10 if negative).
Simulated null distribution (vector of length N).
Monte Carlo p-value.
Character string identifying the test.
Name of the parameter(s) tested.
Value(s) under the null hypothesis.
Error distribution used.
The matched call.
y <- sim_svp(1000, phi = 0.95, sigy = 1, sigv = 0.2)$y
test <- lmc_ar(y, p_null = 1, p_alt = 2, J = 10, N = 49)
print(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.