Title: | Unit Root Tests for Seasonal Time Series |
---|---|
Description: | Seasonal unit roots and seasonal stability tests. P-values based on response surface regressions are available for both tests. P-values based on bootstrap are available for seasonal unit root tests. |
Authors: | Javier López-de-Lacalle [aut], Georgi N. Boshnakov [cre] |
Maintainer: | Georgi N. Boshnakov <[email protected]> |
License: | GPL-2 |
Version: | 2.1-3.9000 |
Built: | 2024-11-20 05:23:12 UTC |
Source: | https://github.com/geobosh/uroot |
Canova and Hansen (CH) test for seasonal stability and Hylleberg, Engle, Granger and Yoo (HEGY) test for seasonal unit roots.
Version >= 2.0.0 is a revival of the former package uroot. Some of the functions provided in the original versions have been coded from the scratch.
The current version provides the Canova and Hansen (CH) test for seasonal stability and the Hylleberg, Engle, Granger and Yoo (HEGY) test for seasonal unit roots.
New features:
The original functions have been enhanced with the following new features: 1) the tests are now applicable to series of any seasonal periodicity (not only quarterly and monthly data), 2) p-values based on response surface regressions are available, 3) bootstrapped p-values are available for the HEGY test statistics.
Old features not currently supported:
Some of the utilities available in the initial versions of the package are not available now: graphics for seasonal series, graphical user interface, bootstrap versions of the statistics, ADF test and KPSS test. Some of these utilities are available in other packages and some will probably be incorporated in future versions of this package.
System requirements:
Windows systems: GPU parallelization of the bootstrap is not currently operational on windows systems.
Unix systems: GPU parallelization of the bootstrap requires a CUDA capable GPU with compute capability >= 3.0.
Javier López-de-Lacalle [email protected].
Burridge, P. and Taylor, R. (2004) "Bootstrapping the HEGY seasonal unit root tests." Journal of Econometrics 123(1), pp. 67-87. DOI: doi:10.1016/j.jeconom.2003.10.029.
Canova, F. and Hansen, Bruce E. (1995) "Are seasonal patterns constant over time? A test for seasonal stability". Journal of Business & Economic Statistics, 13(3), pp. 237-252. DOI: doi:10.1080/07350015.1995.10524598.
Díaz-Emparanza, I. (2014) "Numerical distribution functions for seasonal unit root tests"- Computational Statistics and Data Analysis, 76, pp. 237-247. DOI: doi:10.1016/j.csda.2013.03.006.
Díaz-Emparanza, I. and Moral, M. P. (2013). Seasonal stability tests in gretl. An application to international tourism data. Working paper: Biltoki D.T. 2013.03.
Hylleberg, S., Engle, R., Granger, C. and Yoo, B. (1990) "Seasonal integration and cointegration". Journal of Econometrics 44(1), pp. 215-238. DOI: doi:10.1016/0304-4076(90)90080-D.
UK macroeconomic data. Sample data set employed in Burridge, Gjorstrup and Taylor (2004).
bgt.data
bgt.data
A list containing time series objects.
Burridge, P., Gjorstrup, F. and Taylor, R. (2004) Robust Inference on Seasonal Unit Roots via a Bootstrap Applied to OECD Macroeconomic Series. Department of Economics, City University London. Working Paper 04/08. URL: https://ideas.repec.org/p/cty/dpaper/04-08.html.
U.S. post World War II macroeconomic time series. The data set is described and employed in Canova and Hansen (JBES, 1995, Section 5.1).
ch.data
ch.data
A list containing time series objects.
https://www.ssc.wisc.edu/~bhansen/progs/jbes_95.html
Compute p-values for the Canova and Hansen (CH) test statistic based on the response surface regressions approach.
ch.rs.pvalue(x, type, lag1, S, n, nobsreg, VMdf)
ch.rs.pvalue(x, type, lag1, S, n, nobsreg, VMdf)
x |
a numeric. The value of the CH statistic. |
type |
a string specifying the formulation of the test,
|
lag1 |
logical indicating whether a first order lag of was included in the regression model. |
S |
numeric, the periodicity of the data. |
n |
numeric, the number of observations. |
nobsreg |
an integer indicating the number of points employed in the response surface regression. |
VMdf |
numeric, the degrees of freedom of the Von Mises distribution. |
Ported from Gretl code provided by Díaz-Emparanza and Moral (2013).
For type="dummy"
,
the p-value for the joint test statistic is not available.
This function is mainly intended to be used internally by ch.test
.
A numeric giving the calculated p-value.
Díaz-Emparanza, I. and Moral, M. P. (2013) Seasonal Stability Tests in gretl. An Application to International Tourism Data. Working paper: Biltoki D.T. 2013.03. URL: https://addi.ehu.es/handle/10810/10577. Gretl code: https://www.ehu.eus/ignacio.diaz-emparanza/packages/Canova_Hansen.gfn (seems unavailable, so not linked)
Canova and Hansen (CH) test statistic for the null hypothesis of a stable seasonal pattern.
ch.test(x, type = c("dummy", "trigonometric"), lag1 = FALSE, NW.order = NULL, sid = NULL, xreg = NULL, pvalue = c("RS", "raw"), rs.nobsreg = 13)
ch.test(x, type = c("dummy", "trigonometric"), lag1 = FALSE, NW.order = NULL, sid = NULL, xreg = NULL, pvalue = c("RS", "raw"), rs.nobsreg = 13)
x |
a univariate seasonal time series. |
type |
a character string specifying the formulation of the test,
|
lag1 |
logical, if |
NW.order |
an integer, the lag truncation parameter to be used in the Newey and West covariance matrix. |
sid |
an optional numeric vector, the target seasonal dummies or cycles to be tested. By default all the individual and joint test statistics are returned. |
xreg |
an optional vector or matrix of external regressors with the same length or number of
rows as the length of the input time series |
pvalue |
a character specifying the method employed to compute p-values:
|
rs.nobsreg |
an integer indicating the number of points employed in the response surface
regression (only for |
The seasons or seasonal cycles to be tested can be chosen through
an indicator variable defined in the argument sid
.
By default, all the -statistics
related to each individual dummy or cycle and the joint
-statistic
are returned.
If
type = "dummy"
, the index of the target seasons can be specified in sid
.
For example, in a quarterly series:
sid=c(2)
returns the test statistic to the stability of the second quarter;
sid=c(1,3)
returns the joint test statistic for the first and third quarters;
sid=c(1,2,3,4)
returns the joint test statistic for the null of seasonal
stability at all seasons.
If type = "trigonometric"
, the indicator vector sid
must be of length
floor(frequency(x)/2)
and will consist of ones and zeros. Each element in
sid
is related to each seasonal cycle according to the same order in which
the seasonal frequencies, , are defined:
,
,
where
is the periodicity and
is
floor(frequency(x)/2)
.
For example, in a monthly series:
sid=c(0,0,0,0,0,1)
returns the test statistic to the stability of the cycle with
frequency ;
sid=c(1,0,0,0,0,1)
returns the joint test statistic for cycles related
to frequencies and
;
sid=c(1,1,1,1,1,1)
returns the joint test statistic for the stability of
all seasonal cycles.
The following keywords are also admitted:
sid="all"
, computes all the test statistic related to each individual season
or cycle as well as the joint test statistic for all seasons or cycles;
sid="joint"
computes the joint test statistic for all seasons or cycles.
A list of class "CHtest"
with components:
statistics |
the value of the test statistics. |
pvalues |
the p-values for each test statistics. |
method |
a character string describing the type of test. |
data.name |
a character string giving the name of the data. |
type |
the value of the input argument |
fitted.model |
the fitted regression model. |
NW.order |
the value of the input argument |
isNullxreg |
logical, auxiliary element for |
type.pvalue |
character, the value of the input argument |
pvlabels |
a vector of characters containing a label related to each p-values.
Auxiliary element for |
The method print
displays the test statistics and p-values;
summary
shows the same output and includes the fitted regression model.
When type = "dummy"
, the p-value for the joint test statistic
based on response surface regressions is not available. If pvalue = "RS"
,
the p-value reported for the joint test statistic in the trigonometric version is based
on the tables given in the reference paper, Canova and Hansen (1995).
When sid
is a numeric (selected combination of dummies or cycles),
the reported p-values are based on interpolation in tables;
if pvalue = "RS"
, it is changed to "raw"
and a warning is given.
Canova, F. and Hansen, Bruce E. (1995) "Are seasonal patterns constant over time? A test for seasonal stability". Journal of Business & Economic Statistics, 13(3), pp. 237-252. DOI: doi:10.1080/07350015.1995.10524598.
Díaz-Emparanza, I. and Moral, M. P. (2013). Seasonal stability tests in gretl. An application to international tourism data. Working paper: Biltoki D.T. 2013.03. URL: https://addi.ehu.es/handle/10810/10577. Gretl code: https://www.ehu.eus/ignacio.diaz-emparanza/packages/Canova_Hansen.gfn (seems unavailable, so not linked)
ch.rs.pvalue
seasonal.cycles
,
seasonal.dummies
, uroot.raw.pvalue
.
library(uroot) # example for the series "hours" with the same options # employed in Canova and Hansen (1995) data("ch-data") hours <- diff(log(ch.data$hours)) res1 <- ch.test(x = hours, type = "dummy", lag1 = TRUE, NW.order = 4) res1 # the auxiliary regression is stored in the element "fitted.model" summary(res1$fit) ## Not run: # this requires tables not included in the current version of the package # see note in main documentation file, uroot-package res2 <- ch.test(x = hours, type = "trigonometric", lag1 = TRUE, NW.order = 4) res2 summary(res2$fit) ## End(Not run)
library(uroot) # example for the series "hours" with the same options # employed in Canova and Hansen (1995) data("ch-data") hours <- diff(log(ch.data$hours)) res1 <- ch.test(x = hours, type = "dummy", lag1 = TRUE, NW.order = 4) res1 # the auxiliary regression is stored in the element "fitted.model" summary(res1$fit) ## Not run: # this requires tables not included in the current version of the package # see note in main documentation file, uroot-package res2 <- ch.test(x = hours, type = "trigonometric", lag1 = TRUE, NW.order = 4) res2 summary(res2$fit) ## End(Not run)
Compute p-values for the HEGY test statistics by means of bootstrap.
hegy.boot.pval(x, model0, stats0, deterministic = c(1,0,0), lag.method = c("fixed", "AIC", "BIC"), maxlag = 0, byseason = FALSE, nb = 500, u = NULL, debug.tid = -1)
hegy.boot.pval(x, model0, stats0, deterministic = c(1,0,0), lag.method = c("fixed", "AIC", "BIC"), maxlag = 0, byseason = FALSE, nb = 500, u = NULL, debug.tid = -1)
x |
a univariate seasonal time series. |
model0 |
the |
stats0 |
the |
deterministic |
a vector of length three containing zeros or ones to indicate, respectively, whether a constant, a trend or seasonal dummies are included in the regression equation of the test. |
lag.method |
a character specifying the lag order selection method. |
maxlag |
the maximum lag order to be considered by |
byseason |
logical, should the residuals be resampled by season? If |
nb |
the number of bootstrap replicates. |
u |
optional matrix of integers giving the indices of the resampled residuals. Intended for debugging. |
debug.tid |
numeric, if positive, the bootstrap replicate of the data generated
at iteratin |
See hegy.test
for further details about the arguments that have the
same name in both functions (deterministic
, lag.method
, maxlag
).
Bootstrapped p-values follow the approach described in Burridge and Robert Taylor (2004), except that here, the residuals are resampled regardless of the season they belong to.
A numeric vector containing the p-values of the the test statistics.
The vector is named following the same convention as statistics
and
pvalues
returned by hegy.test
.
If the number of bootstrap replicates is nb = 1
, the resampled
series is returned (relevant for inspection of how the resampled series look like and
for debugging).
Burridge, P. and Taylor, R. (2004) "Bootstrapping the HEGY seasonal unit root tests." Journal of Econometrics 123(1), pp. 67-87. DOI: doi:10.1016/j.jeconom.2003.10.029.
Hylleberg, S., Engle, R., Granger, C. and Yoo, B. (1990) "Seasonal integration and cointegration." Journal of Econometrics 44(1), pp. 215-238. DOI: doi:10.1016/0304-4076(90)90080-D.
## Not run: x <- bgt.data[["LCONSEXPCO"]] # this requires CUDA capable GPU hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1, pvalue = "bootstrap") # alternatively, full R non-parallel version res <- hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1) hegy.boot.pval(x, res$fit, res$stat, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1, nb = 1000) ## End(Not run)
## Not run: x <- bgt.data[["LCONSEXPCO"]] # this requires CUDA capable GPU hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1, pvalue = "bootstrap") # alternatively, full R non-parallel version res <- hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1) hegy.boot.pval(x, res$fit, res$stat, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1, nb = 1000) ## End(Not run)
Compute p-values for the Hylleberg, Engle, Granger and Yoo (HEGY) test statistic by interpolation in precompiled response surfaces.
hegy.rs.pvalue(x, type = c("zero", "pi", "pair", "seasall", "all"), deterministic = c(1, 0, 0), lag.method = c("fixed", "AIC", "BIC"), lag.order, S, n, nobsreg)
hegy.rs.pvalue(x, type = c("zero", "pi", "pair", "seasall", "all"), deterministic = c(1, 0, 0), lag.method = c("fixed", "AIC", "BIC"), lag.order, S, n, nobsreg)
x |
a numeric, the value of the HEGY statistic. |
type |
a character, the type of test statistic, the regressor(s) to which the statistic is related. |
deterministic |
a vector of length three containing zeros and ones to indicate, respectively, whether a constant, a trend or seasonal dummies should be included in the regression equation of the test. |
lag.method |
a character specifying the lag order selection criterion. |
lag.order |
a numeric, the lag order employed in the auxiliary regression. |
S |
numeric, the periodicity of the data. |
n |
numeric, the number of observations. |
nobsreg |
an integer indicating the number of points employed in the response surface regression. |
Ported from Gretl code provided by Díaz-Emparanza (2014).
The original source includes tables with coefficients for the
calculation of p-values when the HQC lag order selection criterion is used.
These tables are not included here.
The case with no deterministic terms (deterministic = c(0,0,0)
) is not considered.
This function is mainly intended to be used internally by hegy.test
.
A numeric, the p-value.
Díaz-Emparanza, I. (2014) "Numerical Distribution Functions for Seasonal Unit Root Tests"- Computational Statistics and Data Analysis 76, pp. 237-247. DOI: doi:10.1016/j.csda.2013.03.006. Gretl code: https://www.ehu.eus/ignacio.diaz-emparanza/packages/Canova_Hansen.gfn/ (seems unavailable, so not linked)
Hylleberg, Engle, Granger and Yoo (HEGY) test statistics for the null hypothesis seasonal unit roots.
hegy.test(x, deterministic = c(1,0,0), lag.method = c("fixed", "AIC", "BIC", "AICc"), maxlag = 0, pvalue = c("RS", "bootstrap", "raw"), rs.nobsreg = 15, boot.args = list(seed = 123, lag.method = lag.method[1], maxlag = maxlag, byseason = FALSE, nb = 1000, BTdim = c(100, 10), debug.tid = -1)) hegy.regressors(x)
hegy.test(x, deterministic = c(1,0,0), lag.method = c("fixed", "AIC", "BIC", "AICc"), maxlag = 0, pvalue = c("RS", "bootstrap", "raw"), rs.nobsreg = 15, boot.args = list(seed = 123, lag.method = lag.method[1], maxlag = maxlag, byseason = FALSE, nb = 1000, BTdim = c(100, 10), debug.tid = -1)) hegy.regressors(x)
x |
a univariate seasonal time series. |
deterministic |
a vector of length three containing zeros or ones to indicate, respectively, whether a constant, a trend or seasonal dummies are included in the regression equation of the test. |
lag.method |
a character specifying the lag order selection method. |
maxlag |
the maximum lag order to be considered by |
pvalue |
a character specifying the method employed to compute p-values:
|
rs.nobsreg |
an integer indicating the number of points employed in the response surface
regression (only for |
boot.args |
a list containing the parameters employed in the bootstrap. See details below. |
The regression equation employed to obtain the tests statistics may include
the following deterministic terms: a constant, a linear trend, seasonal dummies.
These terms are selected by setting to 1 the corresponding element
in the vector deterministic
:
deterministic = c(0,0,0)
no deterministic components,
deterministic = c(1,0,0)
includes a constant,
deterministic = c(1,0,1)
a constant and seasonal dummies,
deterministic = c(1,1,0)
a constant and a trend and
deterministic = c(1,1,1)
includes the three components.
The regression equation may include lags of the dependent variable.
When lag.method = "fixed"
, the lag order is fixed to maxlag
;
otherwise, maxlag
is the maximum number of lags considered in a
lag selection procedure that minimises the lag.method
criterion,
which can be AIC
or BIC
or
corrected AIC, AICc
, obtained as ,
where
is the number of parameters and
is the number of
available observations in the model.
Response surface based -values,
pvalue="RS"
, is not available
with option lag.method = "AICc"
.
P-values based on response surface regressions follow the method described in
MacKinnon (1994), Harvey+vanDijk (2006) and Díaz-Emparanza (2014).
Gretl code provided by Díaz-Emparanza (2014)
has been ported to function hegy.rs.pvalue
.
Note: the case deterministic = c(0,0,0)
is not considered;
NA
s are returned if p-values based on response surfaces are selected for that case.
Bootstrapped p-values follow the approach described in
Burridge and Robert Taylor (2004).
The following arguments can be defined in boot.args
:
seed
: a numeric, the seed of the random generator employed for resampling the residuals.
lag.method
: a character, the lag order selection method. This is the same
as lag.method
employed in the original regression, except that here,
the AIC, BIC and AICc are obtained upon the residual sums of squares rather than the likelihood value.
maxlag
: a numeric, maximum number of lags. Same behaviour as maxlag
explained above for the original regression.
byseason
: logical, should the residuals be resampled by season? If TRUE
,
the residuals belonging to the same season are resampled
(at each time , the residuals belonging to the corresponding season
at time
are resampled);
otherwise, the entire series of residuals is resampled regardless of the season they
belong to.
nb
: a numeric, the number of bootstrap replicates.
BTdim
: a vector of length two containing the number of blocks and the number
of threads per block to be run on parallel on the GPU. The product of these two elements must
be equal or greater than nb
.
debug.tid
: an integer employed for debugging. Currently ignored.
By default boot.args$lag.method
and boot.args$maxlag
are set equal
to the same options employed for the original data in arguments lag.method
and maxlag
; if the default options are desired, these values need not be explicitly
defined in the list boot.args
.
The standard definition of the AIC, BIC and AICc criteria is used for the original series. For the bootstrapped series, these criteria are defined upon the residual sum squares of the model:
where is the residual sum of squares,
is the number of parameters
in the model and
is the number of available observations.
Given a maximum lag, maxlag
, the first maxlag
observations are removed
before fitting the models to be compared by the selected criterion. In this way,
all the models contain the same number of observations.
Once the lag order is selected, the statistics are obtained using
the entire sample (except those observations that are missed due to the eventually chosen lags).
The HEGY regressors were originally proposed in Hylleberg etal. (1990)
for quarterly data. They are generalized to monthly series in Beaulieu and Miron (1993)
and to weekly data in Cáceres (1996).
Franses and Hobijn (1997) show tabulated values for bimonthly and biannual data
as well as quarterly and monthly data.
hegy.rergessors
follows the expressions given in
Smith etal. (2009), which define the regressors for a general periodicity
of the time series.
hegy.test
returns a list of class "HEGYtest"
with the following components:
statistics |
the value of the test statistics. |
pvalues |
the p-values for each test statistics. |
method |
a character string describing the type of test. |
data.name |
a character string giving the name of the data. |
fitted.model |
the fitted regression model. |
lag.method |
a character, the lag order selection criterion. |
lag.order |
a numeric, the number of lags included in the regression. |
strdet |
a character, auxiliary element for |
type.pvalue |
a character, the value of the input argument |
bootstrap |
a list, parameter options employed in the bootstrap (if |
boot.chosen.lags |
a vector, the lag orders chosen for each bootstrap replicate
(if |
pvlabels |
a vector of characters containing a label related to each p-values.
Auxiliary element for |
The method print
displays the test statistics and p-values;
summary
shows the same output and includes the fitted regression model;
residuals
returns the residuals from the regression model fitted to the
original data.
hegy.regressors
returns a matrix containing the HEGY regressors
which are used to test null of unit root at different frequencies.
Beaulieu, J. J. Miron, J. A. (1993) "Seasonal unit roots in aggregate U.S. data." Journal of Econometrics 55(1-2), pp. 305-328. DOI: doi:10.1016/0304-4076(93)90018-Z.
Burridge, P. and Taylor, R. (2004) "Bootstrapping the HEGY seasonal unit root tests." Journal of Econometrics 123(1), pp. 67-87. DOI: doi:10.1016/j.jeconom.2003.10.029.
Cáceres, J. J. (1996) "Contraste de raíces unitarias en datos semanales." Estadística Española 38(41), pp. 139-159.
Díaz-Emparanza, I. (2014) "Numerical distribution functions for seasonal unit root tests"- Computational Statistics and Data Analysis, 76, pp. 237-247. DOI: doi:10.1016/j.csda.2013.03.006. Gretl code: https://www.ehu.eus/ignacio.diaz-emparanza/packages/GHegy.gfn (seems unavailable, so not linked)
Franses, F. H. (1991) "Seasonality, non-stationarity and the forecasting of monthly time series." International Journal of Forecasting 7(2), pp. 199-208. DOI: doi:10.1016/0169-2070(91)90054-Y.
Franses, P. H. and Hobijn, H. (1997) "Critical values for unit root tests in seasonal time series." Journal of Applied Statistics 24(1), pp. 25-47.
Harvey D. I. and van Dijk D. (2006). "Sample size, lag order and critical values of seasonal unit root tests." Computational Statistics & Data Analysis, 50(10), 2734-2751. DOI: doi:10.1016/j.csda.2005.04.011.
Hylleberg, S., Engle, R., Granger, C. and Yoo, B. (1990) "Seasonal integration and cointegration." Journal of Econometrics 44(1), pp. 215-238. DOI: doi:10.1016/0304-4076(90)90080-D.
MacKinnon J. G. (1994). "Approximate asymptotic distribution functions for unit-root and cointegration tests." Journal of Business and Economic Statistics, 12(2), 167-176. DOI: doi:10.1080/07350015.1994.10510005.
Smith, R. J., Taylor, A. M. R. and del Barrio Castro, T. (2009) "Regression-based seasonal unit roots."Econometric Theory 25(2), pp. 527-560. DOI: doi:10.1017/S0266466608090166.
hegy.rs.pvalue
, uroot.raw.pvalue
.
x <- bgt.data[["LCONSEXPCO"]] hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1) ## Not run: # this requires CUDA capable GPU hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1, pvalue = "bootstrap") ## End(Not run)
x <- bgt.data[["LCONSEXPCO"]] hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1) ## Not run: # this requires CUDA capable GPU hegy.test(x, deterministic = c(1,1,1), lag.method = "fixed", maxlag = 1, pvalue = "bootstrap") ## End(Not run)
Generate variables of seasonal dummies and seasonal cycles.
seasonal.dummies(x) seasonal.cycles(x)
seasonal.dummies(x) seasonal.cycles(x)
x |
a univariate seasonal time series. |
A multivariate time series containing the dummies or cycles by columns.
# In terms of model fitting # both sets of variables are equivalent x <- diff(log(AirPassengers)) sd <- seasonal.dummies(x) fit1 <- lm(x ~ sd[,-1]) summary(fit1) sc <- seasonal.cycles(x) fit2 <- lm(x ~ sc) summary(fit1) all.equal(fitted(fit1), fitted(fit2))
# In terms of model fitting # both sets of variables are equivalent x <- diff(log(AirPassengers)) sd <- seasonal.dummies(x) fit1 <- lm(x ~ sd[,-1]) summary(fit1) sc <- seasonal.cycles(x) fit2 <- lm(x ~ sc) summary(fit1) all.equal(fitted(fit1), fitted(fit2))
Compute p-values by interpolation in the tables of critical values provided in the original references given below.
uroot.raw.pvalue(x, type = c("CH", "HEGY"), v, n, ctd, S, Ftpi)
uroot.raw.pvalue(x, type = c("CH", "HEGY"), v, n, ctd, S, Ftpi)
x |
a numeric. The value of the CH statistic. |
type |
a character specifying the type of test statistic. |
v |
numeric, the degrees of freedom of the Von Mises distribution. Only for |
n |
numeric, the number of observations. |
ctd |
a character indicating the deterministic elements that were included
in the HEGY regression. This argument is defined as
|
S |
numeric, the periodicity of the data. |
Ftpi |
a character indicating whether the type of statistic:
|
This function is used internally by ch.test
and
hegy.test
.
A numeric giving the calculated p-value.
Beaulieu, J. J. Miron, J. A. (1993) "Seasonal Unit Roots in Aggregate U.S. Data". Journal of Econometrics, 55(1-2), pp. 305-328. DOI: doi:10.1016/0304-4076(93)90018-Z.
Canova, F. and Hansen, Bruce E. (1995) "Are Seasonal Patterns Constant over Time? A Test for Seasonal Stability". Journal of Business & Economic Statistics, 13(3), pp. 237-252. DOI: doi:10.1080/07350015.1995.10524598.
Hylleberg, S., Engle, R., Granger, C. and Yoo, B. (1990) "Seasonal integration and cointegration". Journal of Econometrics 44(1), pp. 215-238. DOI: doi:10.1016/0304-4076(90)90080-D.