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)

Arguments

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.

Details

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.

Value

A numeric, the p-value.

See also

References

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)