check_fracdist_params {fracdist}R Documentation

Verify that fracdist parameters are valid parameter values

Description

This is a helper function for error handling in the fracdist package. It is not intended to be used externally but might help diagnose error messages from improperly chosen arguments.

Usage

check_fracdist_params(fracdist_params)

Arguments

fracdist_params

a list that may have the following elements:

  • 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.

  • clevel The numeric scalar level of significance.

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

Value

No return value when checks pass, otherwise execution halts and an error message is printed.

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.

Examples

# Test with iscon = 7 to see error message:
check_fracdist_params(list(iq = 2, iscon = 1))
# Test with iq = 13 to see error message:
check_fracdist_params(list(iq = 12, iscon = 1))
# Test with bb = -0.5 to see error message:
check_fracdist_params(list(iq = 12, iscon = 1, bb = 0.75))
# Test with bb = 2.5 to see error message:
check_fracdist_params(list(iq = 12, iscon = 1, bb = 1.5))
# Test with clevel = 2.5 to see error message:
check_fracdist_params(list(iq = 1, iscon = 1, clevel = 0.05))

[Package fracdist version 0.1.1 Index]