check_fracdist_params: Verify that fracdist parameters are valid parameter values

Description Usage Arguments Value References Examples

View source: R/fracdist.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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))

fracdist documentation built on May 25, 2021, 9:07 a.m.