test.par: Likelihood ratio test for partially autoregressive model

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Likelihood ratio test for partially autoregressive model

Usage

1
2
test.par(Y, alpha = 0.05, null_hyp = c("rw", "ar1"), 
  ar1test = c("lr", "kpss"), robust = FALSE)

Arguments

Y

A numeric vector or a par.fit object produced by a previous call to fit.par

alpha

The critical value to be used in determining whether or not to reject the null hypothesis. See which.hypothesis.partest. Default: 0.05.

null_hyp

The null hypothesis. This can be one or both of the following:

  • "rw" Includes the pure random walk as a null hypothesis

  • "ar1" Includes a purely mean-reverting AR(1) series as a null hypothesis

Default: Both "rw" and "ar1"

ar1test

Specifies the type of test to be performed to reject the AR(1) null hypothesis. This can be one of the following:

  • "lr" Likelihood ratio rest

  • "kpss" Unit root test of Kwiatkowski, Phillips, Schmidt and Shin, as implemented in the package urca.

Default: "lr"

robust

TRUE if robust estimation should be used when fitting the models

Details

The partially autoregressive model is fit to Y (or a previously fitted model is re-used if Y is an object of class par.fit), representing the alternative hypothesis. The null models specified by null_hyp are also fit. The likelihood ratio test is then used to determine whether or not the null model(s) should be rejected. Statistics are output containing the test results.

If "ar1" is included in null_hyp and ar1test = "kpss", then the unit root test of Kwiatkowski, Phillips, Schmidt and Shin is used in place of the likelihood ratio test to reject the null hypothesis that Y is a pure AR(1) sequence.

An example invocation of this function is as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  > test.par(x)
 
    Test of [Random Walk or AR(1)] vs Almost AR(1) [LR test for AR1]

  data:  x

  Hypothesis              Statistic    p-value
  Random Walk                 -0.62      0.476
  AR(1)                       -0.11      0.062
  Combined                               0.380

In this invocation, x is tested against the null hypothesis that it is either a pure random walk or a pure AR(1) series. The test of the random walk null hypothesis produces a likelihood ratio score of -0.62, which has a corresponding p-value of 0.476. The test of the AR(1) null nypothesis produces a likelihood ratio score of -0.11, which has a corresponding p-value of 0.062. The p-value for the combined test representing the union of these two conditions is 0.38. Thus, the null hypothesis cannot be rejected.

Value

An object of class "partest"

Author(s)

Matthew Clegg matthewcleggphd@gmail.com

References

Matthew Clegg (2015): Modeling Time Series with Both Permanent and Transient Components using the Partially Autoregressive Model. Available at SSRN: http://ssrn.com/abstract=2556957.

Denis Kwiatkowski, Peter C.B. Phillips, Peter Schmidt, and Yongcheol Shin (1992): Testing the null hypothesis of stationarity against the alternative of a unit root. Journal of Econometrics 54, 159-178.

See Also

fit.par which.hypothesis.partest

Examples

1
2
3
set.seed(1)
x <- rpar(1000, 0.8, 1, 1)
test.par(x)

partialAR documentation built on April 14, 2020, 6:05 p.m.