UnitrootUrcaInterface(fUnitRoots)
UnitrootUrcaInterface()所属R语言包:fUnitRoots
Unit Root Time Series Tests
单位根的时间序列测试
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A collection and description of functions for unit root testing. This is a Rmetrics conform interface to the unitroot tests implemented by B. Pfaff available through the contributed package "urca". <br>
单位根检验的功能集合和描述。这是一个Rmetrics符合接口到的unitroot的贡献包“乌卡”由B.百福可通过实施测试。参考
Added functions based on the 'urca' package include:
URCA“包基础上的新增功能包括:
</table>
</ TABLE>
Note, that the contributed R package urca is required!
请注意,需要的贡献R封装urca!
用法----------Usage----------
urdfTest(x, lags = 1, type = c("nc", "c", "ct"), doplot = TRUE)
urersTest(x, type = c("DF-GLS", "-test"), model = c("constant", "trend"),
lag.max = 4, doplot = TRUE)
urkpssTest(x, type = c("mu", "tau"), lags = c("short", "long", "nil"),
use.lag = NULL, doplot = TRUE)
urppTest(x, type = c("Z-alpha", "Z-tau"), model = c("constant", "trend"),
lags = c("short", "long"), use.lag = NULL, doplot = TRUE)
urspTest(x, type = c("tau", "rho"), pol.deg = c(1, 2, 3, 4),
signif = c(0.01, 0.05, 0.1), doplot = TRUE)
urzaTest(x, model = c("intercept", "trend", "both"), lag, doplot = TRUE)
参数----------Arguments----------
参数:doplot
[ur*Test] - <br> a logical flag, by default TRUE. Should a diagnostical plot be displayed?
[UR *测试] - <BR>的一个逻辑标志,默认情况下,TRUE。如果场诊断图显示?
参数:lag.max
[urersTest] - <br> the maximum numbers of lags used for testing of a decent lag truncation for the "-test", BIC used, or the maximum number of lagged differences to be included in the test regression for "DF-GLS".
[urersTest] - 参考用于测试一个体面的滞后截断滞后的最大数量的"-test",的BIC使用,或在测试中回归"DF-GLS"的最大数量的滞后差异。
参数:lag
[urzaTest] - <br> the highest number of lagged endogenous differenced variables to be included in the test regression.
的[urzaTest] - 参考人数最多的滞后内生的差分变量被包含在测试中回归。
参数:lags
[urkpssTest][urppTest] - <br> the maximum number of lags used for error term correction.
[urkpssTest] [urppTest] - 参考的滞后校正误差项的最大数量。
参数:model
[urersTest] - <br> a character string dennoting the deterministic model used for detrending, either "constant", the default, or "trend". <br> [urppTest] - <br> a character string which determines the deterministic part in the test regression, either "constant", the default, or "trend". <br> [urzaTest] - <br> a character string specifying if the potential break occured in either the "intercept", the linear "trend" or in "both".
[urersTest] - <BR>一个字符串dennoting用于非趋势的确定性模型,是"constant",默认情况下,或"trend"。 。 - [urppTest] - 参考一个字符串,它决定了在测试中回归的确定性部分,是"constant",默认情况下,或"trend"。 。 - [urzaTest] - <BR>如果潜在的突破发生在一个字符串指定的"intercept",线性"trend"或"both"。
参数:pol.deg
[urspTest] - <br> the polynomial degree in the test regression.
参考的[urspTest] - 在测试中的多项式回归。
参数:signif
[urspTest] - <br> the significance level for the critical value of the test statistic.
参考的[urspTest] - 的显着性水平检验统计量的临界值。
参数:type
[urkpssTest] - <br> a character string which denotes the type of deterministic part, either "mu", the default, or "tau". <br> [urppTest] - <br> a character string which specifies the test type, either "Z-alpha", the default, or "Z-tau". <br> [urspTest] - <br> a character string which specifies the test type, either "tau", the default, or "rho".
[urkpssTest] - <BR>一个字符串表示的类型确定部分,无论是"mu",默认情况下,或"tau"。 。 - [urppTest] - <BR>一个字符串,指定测试类型,是"Z-alpha",默认情况下,或"Z-tau"。 。 - [urspTest] - <BR>一个字符串,指定测试类型,是"tau",默认情况下,或"rho"。
参数:use.lag
[urkpssTest] - <br> a character string specifying the number of lags. Allowed arguments are lags=c("short", "long", "nil"), for more information see the details section.<br> [urppTest] - <br> Use of a different lag number, specified by the user.
[urkpssTest] - <BR>的一个字符串指定的滞后阶数。宠物参数是lags=c("short", "long", "nil"),了解更多信息,请参阅细节部分: - [urppTest] - <BR>使用一个不同的滞后数,由用户指定。
参数:x
a numeric vector or time series object.
一个数值向量或时间序列对象。
Details
详细信息----------Details----------
Unit Root Tests from Berhard Pfaff's "urca" Package: <br>
单位根检验Berhard Pfaff的“乌卡”包装:参考
Elliott–Rothenberg–Stock Test for Unit Roots: <br> To improve the power of the unit root test, Elliot, Rothenberg and Stock proposed a local to unity detrending of the time series. ERS developed a feasible point optimal test, "-test", which takes serial correlation of the error term into account. The second test type is the "DF-GLS" test, which is an ADF-type test applied to the detrended data without intercept. Critical values for this test are taken from MacKinnon in case of model="constant" and else from Table 1 of Elliot, Rothenberg and Stock. <br> [urca:ur.ers] <br>
埃利奥特 - 罗森伯格联合试验单位根:<br>要提高功率的单位根检验,埃利奥特,Rothenberg和联合提出了一个统一的本地非趋势的时间序列。 ERS制定一个可行的最佳测试,"-test",需要考虑的误差项的序列相关。的第二测试类型是"DF-GLS"测试,这是施加到没有截距的趋势数据的ADF型测试。本次测试的临界值,从麦金农情况下model="constant"“和其他从表1埃利奥特,Rothenberg和股票。参考[urca:ur.ers]参考
KPSS Test for Unit Roots: <br> Performs the KPSS unit root test, where the Null hypothesis is stationarity. The test types specify as deterministic component either a constant "mu" or a constant with linear trend "tau". lags="short" sets the number of lags to root 4 of [4 times (n/100), whereas lags="long" sets the number of lags to root 4 of [12 times (n/100)]. If lags="nil" is choosen, then no error correction is made. Furthermore, one can specify a different number of maximum lags by setting use.lag accordingly. <br> [urca:ur.kpss] <br>
KPSS测试的单位根,,参考执行KPSS单位根检验的零假设是平稳的。的测试类型指定为确定性成分是一个常量"mu"或一个恒定的线性趋势"tau"。 lags="short"设置的滞后阶数的4倍(N/100)根4,而lags="long"设置的滞后阶数根4 [12倍(N/100)。如果lags="nil"选择,则没有错误校正。此外,可以指定不同数目的最大滞后因此通过设置use.lag。参考[urca:ur.kpss]参考
Phillips&ndasherron Test for Unit Roots: <br> Performs the Phillips and Perron unit root test. Beside the Z statistics Z-alpha and Z-tau, the Z statistics for the deterministic part of the test regression are computed, too. For correction of the error term a Bartlett window is used. <br> [urca:ur.pp] <br>
十字门阶单位根测试:参考执行菲利普斯和Perron单位根检验。旁边的Z统计量Z-α和Z-tau蛋白的确定性部分的测试回归,Z统计量的计算。的误差项的修正,以Bartlett窗口。参考[urca:ur.pp]参考
Schmidt&ndashhillips Test for Unit Roots: <br> Performs the Schmidt and Phillips unit root test, where under the Null and Alternative Hypothesis the coefficients of the deterministic variables are included. Two test types are available: the "rho-test" and the "tau-test". Both tests are extracted from the LM principle. <br> [urca:ur.sp] <br>
施密特 - 菲利普斯的单位根测试:参考执行Schmidt和菲利普斯单位根检验,的空和备择假设下的确定性变量的系数。两种测试类型可供选择:"rho-test"和"tau-test"。这两项测试中提取从LM原则。参考[urca:ur.sp]参考
Zivot–Andrews Test for Unit Roots: <br> Performs the Zivot and Andrews unit root test, which allows a break at an unknown point in either the intercept, the linear trend or in both. This test is based upon the recursive estimation of a test regression. The test statistic is defined as the minimum t-statistic of the coeffcient of the lagged endogenous variable. <br> [urca:ur.za]
Zivot安德鲁斯的单位根测试:参考执行Zivot和Andrews单位根检验,它允许在一个未知点的截距,线性趋势,或两者兼有截断。此测试根据测试回归的递归估计。的滞后的内源性变量的系数可最小t-统计量的检验统计量被定义为。参考[urca:ur.za]
值----------Value----------
All tests return an object of class "fHTEST" with the following slots:
所有测试都返回一个对象类"fHTEST"插槽如下:
<table summary="R valueblock"> <tr valign="top"><td>@call</td> <td> the function call. </td></tr> <tr valign="top"><td>@data</td> <td> a data frame with the input data. </td></tr> <tr valign="top"><td>@data.name</td> <td> a character string giving the name of the data frame. </td></tr> <tr valign="top"><td>@test</td> <td> a list object which holds the output of the underlying test function. </td></tr> <tr valign="top"><td>@title</td> <td> a character string with the name of the test. </td></tr> <tr valign="top"><td>@description</td> <td> a character string with a brief description of the test. </td></tr>
<table summary="R valueblock"> <tr valign="top"> <TD> @call</ TD> <TD>的函数调用。 </ TD> </ TR> <tr valign="top"> <TD>@data </ TD> <td>一个数据框的输入数据。 </ TD> </ TR> <tr valign="top"> <TD>@data.name</ TD> <td>一个字符串提供的数据框的名称。 </ TD> </ TR> <tr valign="top"> <TD>@test</ TD> <td>一个列表对象持有的基本测试功能的输出。 </ TD> </ TR> <tr valign="top"> <TD>@title</ TD> <td>一个字符串的名称的测试。 </ TD> </ TR> <tr valign="top"> <TD>@description</ TD> <td>一个字符串,测试的简要说明。 </ TD> </ TR>
</table> The entries of the @test slot include the following components:
</ TABLE> @test插槽的条目包括以下组件:
<table summary="R valueblock"> <tr valign="top"><td>$statistic</td> <td> the value of the test statistic. </td></tr> <tr valign="top"><td>$parameter</td> <td> the lag order. </td></tr> <tr valign="top"><td>$p.value</td> <td> the p-value of the test. </td></tr> <tr valign="top"><td>$method</td> <td> a character string indicating what type of test was performed. </td></tr> <tr valign="top"><td>$data.name</td> <td> a character string giving the name of the data. </td></tr> <tr valign="top"><td>$alternative</td> <td> a character string describing the alternative hypothesis. </td></tr> <tr valign="top"><td>$name</td> <td> the name of the underlying function, which may be wrapped. </td></tr> <tr valign="top"><td>$output</td> <td> additional test results to be printed. </td></tr>
<table summary="R valueblock"> <tr valign="top"> <TD>$statistic</ TD> <TD>检验统计量的值。 </ TD> </ TR> <tr valign="top"> <TD> $parameter</ TD> <TD>滞后阶数。 </ TD> </ TR> <tr valign="top"> <TD> $p.value</ TD> <TD>的p-值的测试。 </ TD> </ TR> <tr valign="top"> <TD> $method</ TD> <td>一个字符串,表示什么类型的测试进行。 </ TD> </ TR> <tr valign="top"> <TD>$data.name</ TD> <td>一个字符串的名称的数据。 </ TD> </ TR> <tr valign="top"> <TD>$alternative</ TD> <td>一个字符串,描述了另一种假设。 </ TD> </ TR> <tr valign="top"> <TD>$name</ TD> <TD>的底层函数的名称,这可能是包裹。 </ TD> </ TR> <tr valign="top"> <TD> $output </ TD> <TD>额外的测试结果要打印的。 </ TD> </ TR>
</table>
</ TABLE>
注意----------Note----------
The functions ur*Test() fullfill the naming conventions of Rmetrics, return an S4 object named fHTEST as any other hypothesis test from Rmetrics, and allow for timeSeries objects as input. These are the only differences to the original implementation of the functions.
的功能ur*Test()芭比命名约定Rmetrics,返回S4对象,命名为fHTEST任何其他假设检验从Rmetrics,并允许timeSeries对象作为输入。这是唯一的区别,原执行的功能。
Fur further details we refer to the manual pages of the "urca" package.
毛皮进一步的细节,我们"urca"包的手册页。
(作者)----------Author(s)----------
Bernhard Pfaff for the tests implemented in R's "urca" package,<br>
Diethelm Wuertz for the Rmetrics <font face="Courier New,Courier" color="#666666"><b>R</b></font>-port.
参考文献----------References----------
Banerjee A., Dolado J.J., Galbraith J.W., Hendry D.F. (1993); Cointegration, Error Correction, and the Econometric Analysis of Non-Stationary Data, Oxford University Press, Oxford.
Dickey, D.A., Fuller, W.A. (1979); Distribution of the estimators for autoregressive time series with a unit root, Journal of the American Statistical Association 74, 427–431.
Kwiatkowski D., Phillips P.C.B, Schmidt P., Shin Y. (1992); Testing the Null Hypothesis of Stationarity against the Alternative of a Unit Root, Journal of Econometrics 54, 159–178.
Perron P. (1988); Trends and Random Walks in Macroeconomic Time Series, Journal of Economic Dynamics and Control 12, 297–332.
Phillips P.C.B., Perron P. (1988); Testing for a unit root in time series regression, Biometrika 75, 335–346.
Said S.E., Dickey D.A. (1984); Testing for Unit Roots in Autoregressive-Moving Average Models of Unknown Order, Biometrika 71, 599–607.
Schwert G.W. (1989); Tests for Unit Roots: A Monte Carlo Investigation, Journal of Business and Economic Statistics 2, 147–159.
实例----------Examples----------
## Time Series [#时间序列]
# A time series which contains no unit-root:[不包含单位根的时间序列:]
x = rnorm(1000)
# A time series which contains a unit-root:[其中包含一个单位根的时间序列:]
y = cumsum(c(0, x))
## ERS Test:[#ERS测试:]
if (require(urca)) {
urersTest(x)
urersTest(y)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|