BerkowitzTest(rugarch)
BerkowitzTest()所属R语言包:rugarch
Berkowitz Density Forecast Likelihood Ratio Test
贝尔科维奇密度预测似然比检验
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Implements the Berkowitz Density Forecast Likelihood Ratio Test.
实现的的贝尔科维奇密度预测似然比检验。
用法----------Usage----------
BerkowitzTest(data, lags = 1, significance = 0.05, tail.test = FALSE, alpha = 0.05)
参数----------Arguments----------
参数:data
A univariate vector of standard normal transformed values (see details and example).
一元标准正态转换后的值的向量(查看详细信息和例子)。
参数:lags
The number of autoregressive lags (positive and greater than 0).
的自回归滞后的数量(正的和大于0)。
参数:significance
The level of significance at which the Null Hypothesis is evaluated.
在零假设的显着性水平进行了评价。
参数:tail.test
Whether to use the tail test of Berkowitz using a censored likelihood.
无论使用的尾测试贝尔科维奇使用审查的可能性。
参数:alpha
The quantile level for the tail.test cuttoff.
的位数的tail.test cuttoff。
Details
详细信息----------Details----------
See not below.
见没有下文。
值----------Value----------
A list with the following items:<br>
以下项目:参考列表
参数:uLL
The unconditional Log-Likelihood of the maximized values.
无条件的对数似然最大化的值。
参数:rLL
The restricted Log-Likelihood with zero mean, unit variance and zero coefficients in the autoregressive lags.
受限制的对数似然的零均值,单位方差和零系数自回归滞后。
参数:LR
The Likelihood Ratio Test Statistic.
似然比检验统计量。
参数:LRp
The LR test statistic p-value (distributed chisq with 2+lags d.o.f).
LR检验统计量的p值(分布式chisq 2 +滞后自由度)。
参数:H0
The Null Hypothesis.
零假设。
参数:Test
The test of the Null Hypothesis at the requested level of significance.
所要求的显着性水平检验的零假设。
参数:mu
The estimated mean of the model.
估计出的平均的模型。
参数:sigma
The estimated sd of the model.
估计SD的模式。
参数:rho
The estimated autoregressive coefficients of the model (not calculated when tail.test is used).
估计自回归系数的模型中(未计算用于tail.test时)。
参数:JB
The Jarque-Bera Test of Normality Statistic (not calculated when tail.test is used).
在Jarque-Bera检定的正态统计(不计算使用时tail.test)。
参数:JBp
The Jarque-Beta Test Statistic p-value (not calculated when tail.test is used).
哈尔克-β检验统计量的p值(不计算使用时tail.test的)。
注意----------Note----------
The data must first be transformed before being submitted to the function as described here. Given a forecast density (d*) at time t, transform the actual(observed) realizations of the data by applying the distribution function of the forecast density (p*). This will result in a set of uniform values (see Rosenblatt (1952)). Transform those value into standard normal variates by applying the standard normal quantile function (qnorm). The example below hopefully clarifies this. The function also returns the Jarque Bera Normality Test statistic as an additional check of the normality assumption which the test does not explicitly account for (see Dowd reference). When tail.test is used, the test of the tail at the “alpha” quantile level is performed using a censored normal likelihood.
必须首先将数据转化之前被提交到这里所描述的功能。由于在时间t的预测密度(为d *),(实测值)的实际实现的数据转换通过施加的预测密度(对*)的分布函数。这将导致一组均匀值(见罗森布莱特(1952))。这些值转换成标准的正常分布随机应用标准正态分位数的功能(qnorm)。希望下面的例子阐明了这一点。的功能也返回雅克贝拉的正态性检验统计量的正态性假设的测试并没有明确帐户(见多德参考)作为一个额外的检查。使用tail.test时,在“阿尔法”位数水平测试的尾巴进行使用一个审查正常的可能性。
(作者)----------Author(s)----------
Alexios Ghalanos
参考文献----------References----------
management, Journal of Business and Economic Statistics, 19(4), 465–474.<br> Dowd, K. 2004, A modified Berkowitz back-test, RISK Magazine, 17(4), 86–87.<br> Jarque, C.M. and Bera, A.K. 1987, A test for normality of observations and regression residuals, International Statistical Review, 55(2), 163–172.<br> Rosenblatt, M. 1952, Remarks on a multivariate transformation, The Annals of Mathematical Statistics, 23(3), 470–472.
实例----------Examples----------
## Not run: [#不运行:]
# A univariate GARCH model is used with rolling out of sample forecasts.[使用一个单变量GARCH模型推出样品的预测。]
data(dji30ret)
spec = ugarchspec(mean.model = list(armaOrder = c(6,1), include.mean = TRUE),
variance.model = list(model = "gjrGARCH"), distribution.model = "nig")
fit = ugarchfit(spec, data = dji30ret[, 1, drop = FALSE], out.sample = 1000)
pred = ugarchforecast(fit, n.ahead = 1, n.roll = 999)
dmatrix = cbind(as.array(pred)[,2,],as.array(pred)[,1,], coef(fit)["skew"],
coef(fit)["shape"])
colnames(dmatrix) = c("mu", "sigma", "skew", "shape")
# Get Realized (Oberved) Data[实现的(Oberved的)数据]
obsx = tail(dji30ret[,1], 1000)
# you can check that this is correct by looking at the dates of the first and [你可以检查,这是正确的日期的第一,]
# last predictions:[最后的预言:]
as.data.frame(pred, rollframe = 0)
head(tail(dji30ret[,1, drop = FALSE], 1000), 1)
as.data.frame(pred, rollframe = 999)
tail(dji30ret[,1, drop = FALSE], 1)
# Transform to Uniform[变换的统一]
uvector = apply(cbind(obsx,dmatrix), 1, FUN = function(x) pdist("nig", q = x[1],
mu = x[2], sigma = x[3], skew = x[4], shape = x[5]))
# hist(uvector)[历史(uvector)]
# transform to N(0,1)[变换为N(0,1)]
nvector = qnorm(uvector)
test1 = BerkowitzTest(data = nvector, lags = 1, significance = 0.05)
test2 = BerkowitzTest(data = nvector, alpha = 0.05, significance = 0.05,
tail.test=TRUE)
test3 = BerkowitzTest(data = nvector, alpha = 0.01, significance = 0.05,
tail.test=TRUE)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|