fpcrit {fracdist} | R Documentation |
Calculate Critical Values for Fractional Unit Root and Cointegration Tests
Description
fcrit
calculates critical values for a particular level of significance
and a set of intermediate calculations
that are output from other functions in the fracdist
package.
Usage
fpcrit(npts = 9, iq, clevel, probs, bedf, ginv)
Arguments
npts |
An integer number of points for local approximation
of the EDF near the level of significance |
iq |
An integer scalar rank parameter for the test, from 1 through 12. This is often the difference in cointegration rank. |
clevel |
The numeric scalar level of significance. |
probs |
A numeric vector of probabilities over which an approximating empirical distribution function is obtained, taken from precalculated tables. |
bedf |
A numeric vector of quantiles of numerical distribution for specified
value of fractional integration order |
ginv |
A numeric vector of quantiles of the approximating chi-squared distribution. |
Value
A numeric scalar critical value, a quantile of the distribution.
References
James G. MacKinnon and Morten Ørregaard Nielsen, "Numerical Distribution Functions of Fractional Unit Root and Cointegration Tests," Journal of Applied Econometrics, Vol. 29, No. 1, 2014, pp.161-171.
See Also
fracdist_values for the calculation of critical values and P-values including any intermediate calculations.
Examples
frtab <- get_fracdist_tab(iq = 3, iscon = 0)
bval <- unique(frtab[, 'bbb'])
probs <- unique(frtab[, 'probs'])
bedf <- rep(NA, length(probs))
for (i in 1:length(probs)) {
estcrit <- frtab[frtab[, 'probs'] == probs[i], 'xndf']
bedf[i] <- blocal(nb = 31, bb = 0.75, estcrit, bval)
}
fpcrit(npts = 9, iq = 3, clevel = 0.05, probs, bedf, ginv = qchisq(probs, df = 3^2))