Learn R Programming

fracdist (version 0.1.1)

fracdist_values: Calculate Critical Values or P-values for Fractional Unit Root and Cointegration Tests

Description

fracdist_values calculates either critical Values or P-values for for fractional unit root and cointegration tests

Usage

fracdist_values(
  iq,
  iscon,
  dir_name = NULL,
  bb,
  stat,
  ipc = TRUE,
  clevel = c(0.01, 0.05, 0.1)
)

Arguments

iq

An integer scalar rank parameter for the test, from 1 through 12. This is often the difference in cointegration rank.

iscon

An indicator that there is a constant intercept term in the model.

dir_name

A string name of directory in which the approximating tables are stored. This is not normally used, since sufficient tables are included in the package. However, a user might want to draw the tables from another location.

bb

The fractional integration parameter, which can take on values between 0.0 and 2.0.

stat

A numeric scalar value of the test statistic. This is only used if P-values are required.

ipc

A logical indicator to calculate a P-value. If ipc == FALSE critical values are calculated instead.

clevel

The numeric scalar level of significance. The default is to calculate critical values for the conventional levels of significance: clevel = c(0.01, 0.05, 0.10).

Value

Either a numeric scalar P-value, if ipc == TRUE, otherwise, a numeric vector of critical values, the same length as clevel.

References

James G. MacKinnon and Morten <U+00D8>rregaard Nielsen, "Numerical Distribution Functions of Fractional Unit Root and Cointegration Tests," Journal of Applied Econometrics, Vol. 29, No. 1, 2014, pp.161-171.

Johansen, S. and M. <U+00D8>. Nielsen (2012). "Likelihood inference for a fractionally cointegrated vector autoregressive model," Econometrica 80, pp.2667-2732.

See Also

Calls fpval to calculate P-values or fpcrit to calculate critical values, after performing some intermediate calculations.

Examples

Run this code
# NOT RUN {
# Calculate P-values:
fracdist_values(iq = 1, iscon = 0, bb = 0.43, stat = 3.84)
fracdist_values(iq = 1, iscon = 0, bb = 0.73, stat = 3.84)
# Calculate critical values:
fracdist_values(iq = 1, iscon = 0, bb = 0.73, ipc = FALSE, clevel = 0.05)
fracdist_values(iq = 1, iscon = 0, bb = 0.43, ipc = FALSE, clevel = 0.05)
fracdist_values(iq = 1, iscon = 0, bb = 0.73, ipc = FALSE)
# }

Run the code above in your browser using DataLab