Package 'urca'

Title: Unit Root and Cointegration Tests for Time Series Data
Description: Unit root and cointegration tests encountered in applied econometric analysis are implemented.
Authors: Bernhard Pfaff [aut, cre], Eric Zivot [ctb], Matthieu Stigler [ctb]
Maintainer: Bernhard Pfaff <[email protected]>
License: GPL (>= 2)
Version: 1.3-4
Built: 2024-09-28 07:08:36 UTC
Source: CRAN

Help Index


Likelihood ratio test for restrictions on alpha and beta

Description

This function estimates a restricted VAR, where the restrictions are based upon α\bold{\alpha}, i.e. the loading vectors and β\bold{\beta}, i.e the matrix of cointegration vectors. The test statistic is distributed as χ2\chi^2 with (pm)r+(ps)r(p-m)r + (p-s)r degrees of freedom, with mm equal to the columns of the restricting matrix A\bold{A}, ss equal to the columns of the restricting matrix H\bold{H} and pp the order of the VAR.

Usage

ablrtest(z, H, A, r)

Arguments

z

An object of class ca.jo.

H

The (p×s)(p \times s) matrix containing the restrictions on β\bold{\beta}.

A

The (p×m)(p \times m) matrix containing the restrictions on α\bold{\alpha}.

r

The count of cointegrating relationships;
inferred from summary(ca.jo-object).

Details

The restricted α\bold{\alpha} matrix, as well as β\bold{\beta} is normalised with respect to the first variable.

Value

An object of class cajo.test.

Author(s)

Bernhard Pfaff

References

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo, alrtest, blrtest, cajo.test-class, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",
season=4)
HD1 <- matrix(c(1, -1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1), c(5,3))
DA <- matrix(c(1,0,0,0, 0, 1, 0, 0, 0, 0, 0, 1), c(4,3))
summary(ablrtest(sjd.vecm, H=HD1, A=DA, r=1))

OLS regression of VECM weighting matrix

Description

This functions estimates the α\bold{\alpha} matrix of a VECM. The following OLS regression of the R-form of the VECM is hereby utilised:

R0t=αβRkt+εtt=1,,T\bold{R}_{0t} = \bold{\alpha}\bold{\beta}\prime \bold{R}_{kt} + \bold{\varepsilon}_t \qquad t=1, \dots, T

Usage

alphaols(z, reg.number = NULL)

Arguments

z

An object of class ca.jo.

reg.number

The number of the equation in the R-form that should be estimated or if set to NULL (the default), all equations within the R-form are estimated.

Details

The cointegrating relations, i.e. Rktβ\bold{R}_{kt}\prime \bold{\beta} are calculated by using z@RK and z@V.

Value

Returns an object of class lm.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo, lm, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm1 <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",
season=4)
summary(alphaols(sjd.vecm1))
summary(alphaols(sjd.vecm1, reg.number=1))

Likelihood ratio test for restrictions on alpha

Description

This function estimates a restricted VAR, where the restrictions are base upon α\bold{\alpha}, i.e. the loading vectors. The test statistic is distributed as χ2\chi^2 with r(pm)r(p-m) degrees of freedom, with mm equal to the columns of the restricting matrix A\bold{A}.

Usage

alrtest(z, A, r)

Arguments

z

An object of class ca.jo.

A

The (p×m)(p \times m) matrix containing the restrictions on α\bold{\alpha}.

r

The count of cointegration relationships;
inferred from summary(ca.jo-object).

Details

The orthogonal matrix to A\bold{A} can be accessed as object@B. The restricted α\bold{\alpha} matrix is normalised with respect to the first variable.

Value

An object of class cajo.test.

Author(s)

Bernhard Pfaff

References

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo, blrtest, ablrtest, cajo.test-class, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",
season=4)
DA <- matrix(c(1,0,0,0), c(4,1))
summary(alrtest(sjd.vecm, A=DA, r=1))

Likelihood ratio test for restrictions under partly known beta

Description

This function estimates a restricted VAR, where some of the cointegration vectors are known. The known cointegration relationships have to be provided in an pxr1p x r1 matrix H\bold{H}. The test statistic is distributed as χ2\chi^2 with (pr)r1(p-r)r1 degrees of freedom, with rr equal to total number of cointegration relations.

Usage

bh5lrtest(z, H, r)

Arguments

z

An object of class ca.jo.

H

The (p×r1)(p \times r1) matrix containing the known cointegration relations.

r

The count of cointegrating relationships;
inferred from summary(ca.jo-object).

Details

Please note, that the number of columns of H\bold{H} must be smaller than the count of cointegration relations rr.

Value

An object of class cajo.test.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1995), Likelihood-Based Inference in Cointegrated Vector Autoregressive Models, Oxford University Press, Oxford.

Johansen, S. and Juselius, K. (1992), Testing structural hypotheses in a multivariate cointegration analysis of the PPP and the UIP for UK, Journal of Econometrics, 53, 211–244.

See Also

ca.jo, alrtest, ablrtest, blrtest, bh6lrtest, cajo.test-class, ca.jo-class and urca-class.

Examples

data(UKpppuip)
attach(UKpppuip)
dat1 <- cbind(p1, p2, e12, i1, i2)
dat2 <- cbind(doilp0, doilp1)
H1 <- ca.jo(dat1, type='trace', K=2, season=4, dumvar=dat2)
H51 <- c(1, -1, -1, 0, 0)
H52 <- c(0, 0, 0, 1, -1)
summary(bh5lrtest(H1, H=H51, r=2))
summary(bh5lrtest(H1, H=H52, r=2))

Likelihood ratio test for restrictions under partly known beta in a subspace

Description

This function estimates a restricted VAR, where some restrictions are placed on r1r1 cointegrating relations which are chosen in the space of the matrix H. The test statistic is distributed as χ2\chi^2 with (psr2)r1(p-s-r2)r1 degrees of freedom, with ss equal to the number of columns of H\bold{H}, r1r1 the number of cointegrating relations in the first partition and r2r2 the number of cointegrating relations in the second partition which will be estimated without any restrictions.

Usage

bh6lrtest(z, H, r, r1, conv.val = 0.0001, max.iter = 50)

Arguments

z

An object of class ca.jo.

H

The (p×s)(p \times s) matrix containing the known cointegration relations.

r

The count of cointegrating relationships;
inferred from summary(ca.jo-object).

r1

The count of cointegrating relationships in the first partition of the cointegration space;

conv.val

The convergence value of the algorithm. (see details);

max.iter

The maximal number of iterations.

Details

Please note, that the following ordering of the dimensions should be obeyed: r1spr2r1 \leq s \leq p - r2. A two-step algorithm is used to determine the eigen values of the restricted model. Convergence is achieved if the quadratic norm of the eigen values is smaller than conv.val.

Value

An object of class cajo.test.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1995), Likelihood-Based Inference in Cointegrated Vector Autoregressive Models, Oxford University Press, Oxford.

Johansen, S. and Juselius, K. (1992), Testing structural hypotheses in a multivariate cointegration analysis of the PPP and the UIP for UK, Journal of Econometrics, 53, 211–244.

See Also

ca.jo, alrtest, ablrtest, blrtest, bh5lrtest, cajo.test-class, ca.jo-class and urca-class.

Examples

data(UKpppuip)
attach(UKpppuip)
dat1 <- cbind(p1, p2, e12, i1, i2)
dat2 <- cbind(doilp0, doilp1)
H1 <- ca.jo(dat1, type='trace', K=2, season=4, dumvar=dat2)
H6 <- matrix(c(1,0,0,0,0, 0,1,0,0,0, 0,0,1,0,0), c(5,3))
bh6lrtest(z=H1, H=H6, r=2, r1=1, conv.val=0.0001, max.iter=50)

Likelihood ratio test for restrictions on beta

Description

This function estimates a restricted VAR, where the restrictions are base upon β\bold{\beta}, i.e. the cointegration vectors. The test statistic is distributed as χ2\chi^2 with r(ps)r(p-s) degrees of freedom, with ss equal to the columns of the restricting matrix H\bold{H}.

Usage

blrtest(z, H, r)

Arguments

z

An object of class ca.jo.

H

The (p×s)(p \times s) matrix containing the restrictions on β\bold{\beta}.

r

The count of cointegrating relationships;
inferred from summary(ca.jo-object).

Details

Please note, that in the case of nested hypothesis, the reported p-value should be adjusted to r(s1s2)r(s1-s2) (see Johansen, S. and K. Juselius (1990)).

Value

An object of class cajo.test.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo, alrtest, ablrtest, bh5lrtest, bh6lrtest, cajo.test-class, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet="const", type="eigen", K=2, spec="longrun",
season=4)
HD0 <- matrix(c(-1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1), c(5,4))
summary(blrtest(sjd.vecm, H=HD0, r=1))

Johansen Procedure for VAR

Description

Conducts the Johansen procedure on a given data set. The "trace" or "eigen" statistics are reported and the matrix of eigenvectors as well as the loading matrix.

Usage

ca.jo(x, type = c("eigen", "trace"), ecdet = c("none", "const", "trend"), K = 2,
spec=c("longrun", "transitory"), season = NULL, dumvar = NULL)

Arguments

x

Data matrix to be investigated for cointegration.

type

The test to be conducted, either ‘eigen’ or ‘trace’.

ecdet

Character, ‘none’ for no intercept in cointegration, ‘const’ for constant term in cointegration and ‘trend’ for trend variable in cointegration.

K

The lag order of the series (levels) in the VAR.

spec

Determines the specification of the VECM, see details below.

season

If seasonal dummies should be included, the data frequency must be set accordingly, i.e ‘4’ for quarterly data.

dumvar

If dummy variables should be included, a matrix with row dimension equal to x can be provided.

Details

Given a general VAR of the form:

Xt=Π1Xt1++ΠkXtk+μ+ΦDt+εt,(t=1,,T),\bold{X}_t = \bold{\Pi}_1 \bold{X}_{t-1} + \dots + \bold{\Pi}_k \bold{X}_{t-k} + \bold{\mu} + \bold{\Phi D}_t + \bold{\varepsilon}_t , \quad (t = 1, \dots, T),

the following two specifications of a VECM exist:

ΔXt=Γ1ΔXt1++Γk1ΔXtk+1+ΠXtk+μ+ΦDt+εt\Delta \bold{X}_t = \bold{\Gamma}_1 \Delta \bold{X}_{t-1} + \dots + \bold{\Gamma}_{k-1} \Delta \bold{X}_{t-k+1} + \bold{\Pi X}_{t-k} + \bold{\mu} + \bold{\Phi D}_t + \bold{\varepsilon}_t

where

Γi=(IΠ1Πi),(i=1,,k1),\bold{\Gamma}_i = - (\bold{I} - \bold{\Pi}_1 - \dots - \bold{\Pi}_i), \quad (i = 1, \dots , k-1),

and

Π=(IΠ1Πk)\bold{\Pi} = -(\bold{I} - \bold{\Pi}_1 - \dots - \bold{\Pi}_k)

The Γi\bold{\Gamma}_i matrices contain the cumulative long-run impacts, hence if spec="longrun" is choosen, the above VECM is estimated.

The other VECM specification is of the form:

ΔXt=Γ1ΔXt1++Γk1ΔXtk+1+ΠXt1+μ+ΦDt+εt\Delta \bold{X}_t = \bold{\Gamma}_1 \Delta \bold{X}_{t-1} + \dots + \bold{\Gamma}_{k-1} \Delta \bold{X}_{t-k+1} + \bold{\Pi X}_{t-1} + \bold{\mu} + \bold{\Phi D}_t + \bold{\varepsilon}_t

where

Γi=(Πi+1++Πk),(i=1,,k1),\bold{\Gamma}_i = - (\bold{\Pi}_{i+1} + \dots + \bold{\Pi}_k), \quad(i = 1, \dots , k-1),

and

Π=(IΠ1Πk).\bold{\Pi} = -(\bold{I} - \bold{\Pi}_1 - \dots - \bold{\Pi}_k).

The Π\bold{\Pi} matrix is the same as in the first specification. However, the Γi\bold{\Gamma}_i matrices now differ, in the sense that they measure transitory effects, hence by setting spec="transitory" the second VECM form is estimated. Please note that inferences drawn on Π\bold{\Pi} will be the same, regardless which specification is choosen and that the explanatory power is the same, too.

If "season" is not NULL, centered seasonal dummy variables are included.

If "dumvar" is not NULL, a matrix of dummy variables is included in the VECM. Please note, that the number of rows of the matrix containing the dummy variables must be equal to the row number of x.

Critical values are only reported for systems with less than 11 variables and are taken from Osterwald-Lenum.

Value

An object of class ca.jo.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

Osterwald-Lenum, M. (1992), A Note with Quantiles of the Asymptotic Distribution of the Maximum Likelihood Cointegration Rank Test Statistics, Oxford Bulletin of Economics and Statistics, 55, 3, 461–472.

See Also

plotres, alrtest, ablrtest, blrtest, cajolst, cajools, lttest, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",
season=4)
summary(sjd.vecm)
#
data(finland)
sjf <- finland
sjf.vecm <- ca.jo(sjf, ecdet = "none", type="eigen", K=2,
spec="longrun", season=4)
summary(sjf.vecm)

Representation of class ca.jo

Description

This class contains the relevant information by applying the Johansen procedure to a matrix of time series data.

Slots

x:

Object of class "ANY": A data matrix, or an object that can be coerced to it.

Z0:

Object of class "matrix": The matrix of the differenced series.

Z1:

Object of class "matrix": The regressor matrix, except for the lagged variables in levels.

ZK:

Object of class "matrix": The matrix of the lagged variables in levels.

type:

Object of class "character": The type of the test, either "trace" or "eigen".

model:

Object of class "character": The model description in prose, with respect to the inclusion of a linear trend.

ecdet:

Object of class "character": Specifies the deterministic term to be included in the cointegration relation. This can be either "none", "const", or "trend".

lag:

Object of class "integer": The lag order for the variables in levels.

P:

Object of class "integer": The count of variables.

season:

Object of class "ANY": The frequency of the data, if seasonal dummies should be included, otherwise NULL.

dumvar:

Object of class "ANY": A matrix containing dummy variables. The row dimension must be equal to x, otherwise NULL.

cval:

Object of class "ANY": The critical values of the test at the 1%, 5% and 10% level of significance.

teststat:

Object of class "ANY": The values of the test statistics.

lambda:

Object of class "vector": The eigenvalues.

Vorg:

Object of class "matrix": The matrix of eigenvectors, such that V^SkkV^=I\hat V'S_{kk}\hat V = I.

V:

Object of class "matrix": The matrix of eigenvectors, normalised with respect to the first variable.

W:

Object of class "matrix": The matrix of loading weights.

PI:

Object of class "matrix": The coeffcient matrix of the lagged variables in levels.

DELTA:

Object of class "matrix": The variance/covarinace matrix of V.

GAMMA:

Object of class "matrix": The coeffecient matrix of Z1.

R0:

Object of class "matrix": The matrix of residuals from the regressions in differences.

RK:

Object of class "matrix": The matrix of residuals from the regression in lagged levels.

bp:

Object of class "ANY": Potential break point, only set if function cajolst is called, otherwise NA.

test.name:

Object of class "character": The name of the test, i.e. ‘Johansen-Procedure’.

spec:

Object of class "character": The specification of the VECM.

call:

Object of class "call": The call of function ca.jo.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ca.jo") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but critical values, eigenvectors and loading matrix added.

plot:

The series of the VAR and their potential cointegration relations.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo, plotres and urca-class.


Phillips and Ouliaris Cointegration Test

Description

Performs the Phillips and Ouliaris "Pu" and "Pz" cointegration test.

Usage

ca.po(z, demean = c("none", "constant", "trend"),
      lag = c("short", "long"), type = c("Pu", "Pz"), tol = NULL)

Arguments

z

Data matrix to be investigated for cointegration.

demean

The method for detrending the series, either "none", "constant" or "trend".

lag

Either a short or long lag number used for variance/covariance correction.

type

The test type, either "Pu" or "Pz".

tol

Numeric, this argument is passed to solve() in ca.po().

Details

The test "Pz", compared to the test "Pu", has the advantage that it is invariant to the normalization of the cointegration vector, i.e. it does not matter which variable is on the left hand side of the equation. In case convergence problems are encountered by matrix inversion, one can pass a higher tolerance level via "tol=..." to the solve()-function.

Value

An object of class ca.po.

Author(s)

Bernhard Pfaff

References

Phillips, P.C.B. and Ouliaris, S. (1990), Asymptotic Properties of Residual Based Tests for Cointegration, Econometrica, Vol. 58, No. 1, 165–193.

See Also

ca.po-class

Examples

data(ecb)
m3.real <- ecb[,"m3"]/ecb[,"gdp.defl"]
gdp.real <- ecb[,"gdp.nom"]/ecb[,"gdp.defl"]
rl <- ecb[,"rl"]
ecb.data <- cbind(m3.real, gdp.real, rl)
m3d.po <- ca.po(ecb.data, type="Pz")
summary(m3d.po)

Representation of class ca.po

Description

This class contains the relevant information by applying the Phillips and Ouliaris cointegration test to a data matrix.

Slots

z:

Object of class "ANY": A data matrix, or an object that can be coerced to it.

type:

Object of class "character": The type of the test, either the "Pu"-test or the normalisation invariant "Pz"-test.

model:

Object of class "character": Determines how the series should be detrended.

lag:

Object of class "integer": The lags used for variance/covariance correction.

cval:

Object of class "matrix": The critical values of the test at the 1%, 5% and 10% level of significance.

res:

Object of class "matrix": The residuals of the the cointegration regression(s).

teststat:

Object of class "numeric": The value of the test statistic.

testreg:

Object of class "ANY": The summary output of the cointegration regression(s).

test.name:

Object of class "character": The name of the test, i.e. ‘Phillips and Ouliaris’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ca.po") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but critical value and summary of test regression(s) added.

plot:

Residual plot(s) and their acfs' and pacfs'.

Author(s)

Bernhard Pfaff

References

Phillips, P.C.B. and Ouliaris, S. (1990), Asymptotic Properties of Residual Based Tests for Cointegration, Econometrica, Vol. 58, No. 1, 165–193.

See Also

ca.po and urca-class.


Representation of class cajo.test

Description

This class contains the relevant information by estimating and testing a VAR under linear restrictions on α\bold{\alpha} and β\bold{\beta}.

Slots

Z0:

Object of class "matrix": The matrix of the differenced series.

Z1:

Object of class "matrix": The regressor matrix, except for the lagged variables in levels.

ZK:

Object of class "matrix": The matrix of the lagged variables in levels.

ecdet:

Object of class "character": Specifies the deterministic term to be included in the cointegration relation. This can be either "none", "const", or "trend".

H:

Object of class "ANY": The matrix containing the restrictions placed upon β\bold{\beta}.

A:

Object of class "ANY": The matrix containing the restrictions placed upon α\bold{\alpha}.

B:

Object of class "ANY": The matrix orthogonal to matrix A\bold{A}.

type:

Object of class "character": The test type.

teststat:

Object of class "numeric": The value of the test statistic.

pval:

Object of class "vector": The p-value and the degrees of freedom.

lambda:

Object of class "vector": The eigenvalues of the restricted model.

Vorg:

Object of class "matrix": The matrix of eigenvectors, such that V^(HSH)V^=I\hat V_{\dots}'(H'S_{\dots}H)\hat V_{\dots} = I.

V:

Object of class "matrix": The matrix of the restricted eigenvectors, normalised with respect to the first variable.

W:

Object of class "matrix": The matrix of the corresponding loading weights.

PI:

Object of class "matrix": The coefficient matrix of the lagged variables in levels.

DELTA:

Object of class "ANY": The variance/covarinace matrix of V\bold{V}.

DELTA.bb:

Object of class "ANY": The variance/covarinace matrix of the marginal factor BR0t\bold{B}'\bold{R}_{0t}.

DELTA.ab:

Object of class "ANY": The variance/covarinace matrix of the conditional distribution of AR0t\bold{A}'\bold{R}_{0t} and Rkt\bold{R}_{kt}.

DELTA.aa.b:

Object of class "ANY": The variance/covarinace matrix of the restricted loading matrix.

GAMMA:

Object of class "matrix": The coefficient matrix of Z1\bold{Z1}.

test.name:

Object of class "character": The name of the test, i.e. ‘Johansen-Procedure’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="cajo.test") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test-statistic.

summary:

like show, but p-value of test statistic, restricted eigenvectors, loading matrix and restriction matrices H\bold{H} and A\bold{A}, where applicable, added.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ablrtest, alrtest, blrtest, ca.jo, ca.jo-class and urca-class.


Testing Cointegrating Rank with Level Shift at Unknown time

Description

The function cajolst implements the procedure by Luetkepohl et al. to test for the cointegration rank of a VAR process with a level shift at an unknown time.

Usage

cajolst(x, trend = TRUE, K = 2, season = NULL)

Arguments

x

Data matrix to be investigated for cointegration.

trend

A linear trend is included in the auxiliary regressions for data adjustment (default is TRUE).

K

The lag order of the series (levels) in the VAR, must be at least equal to K=2K = 2.

season

If seasonal dummies should be included, the data frequency must be set accordingly, i.e ‘4’ for quarterly data.

Details

Note, that the slot "x" of the returned object contains the adjusted data series, that is, a matrix adjusted for the temptative break point, and if applicable, a linear trend and/or seasonal effects. The VECM is then estimated and tested for cointegration rank subject to the adjusted matrix. The break point is contained in the slot "bp". Please note, that the transitory VECM specification is estimated and that only the trace test is available. The critical values are taken from Trenkler, Carsten (2003).

Value

Returns an object of class ca.jo.

Author(s)

Bernhard Pfaff

References

L\"utkepohl, H., Saikkonen, P. and Trenkler, C. (2004), Testing for the Cointegrating Rank of a VAR Process with Level Shift at Unknown Time, Econometrica, Vol. 72, No. 2, 647–662.

Trenkler, Carsten (2003), A new set of critical values for systems cointegration tests with a prior adjustment for deterministic terms, Economics Bulletin, Vol. 3, No. 11, 1–9.

See Also

plotres, alrtest, ablrtest, blrtest, ca.jo, cajools, lttest, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.lst <- cajolst(sjd, trend=TRUE, K=2, season=4)
summary(sjd.lst)

OLS regression of VECM

Description

This function returns the OLS regressions of an unrestricted VECM, i.e. it returns an object of class lm. The user can provide a certain number of which equation in the VECM should be estimated and reported, or if "reg.number=NULL" each equation in the VECM will be estimated and its results are reported.

Usage

cajools(z, reg.number = NULL)

Arguments

z

An object of class ca.jo or cajo.test.

reg.number

The number of the equation in the VECM that should be estimated or if set to NULL (the default), all equations within the VECM are estimated.

Value

Returns an object of class lm.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo, cajorls, lm, ca.jo-class and urca-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm1 <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",
season=4)
sjd.vecm2 <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="transitory",
season=4)
sjd.vecm.ols1 <- cajools(sjd.vecm1)
sjd.vecm.ols2 <- cajools(sjd.vecm2)
summary(sjd.vecm.ols1)
summary(sjd.vecm.ols2)

OLS regression of VECM

Description

This function returns the OLS regressions of a restricted VECM, i.e. it returns a list object with elements of class ‘lm’ containing the restricted VECM and a matrix object with the normalised cointegrating relationships. The user can provide a certain number of which equation in the VECM should be estimated and reported, or if "reg.number = NULL" each equation in the VECM will be estimated and its results are reported. Furthermore, the cointegratioon rank has to be supplied too.

Usage

cajorls(z, r = 1, reg.number = NULL)

Arguments

z

An object of class ca.jo or cajo.test.

r

An integer, signifiying the cointegration rank.

reg.number

The number of the equation in the VECM that should be estimated or if set to NULL (the default), all equations within the VECM are estimated.

Details

The cointegration space is normalised as βc=β(Sβ)1\bold{\beta}_c = \bold{\beta}(S'\bold{\beta})^{-1}, with S=(Ir,0)S' = (I_r, 0).

Value

Returns a list object with elements of class lm for the restricted VECM and a matrix object with the normalised cointegrating vectors.

Author(s)

Bernhard Pfaff

References

Johansen, S. (1995), Likelihood-Based Inference in Cointegrated Vector Autoregressive Models, Oxford University Press, Oxford.

Lütkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.

See Also

ca.jo, cajools, lm, ca.jo-class and urca-class.

Examples

data(finland)
sjf <- finland
sjf.vecm <- ca.jo(sjf, ecdet = "none", type = "eigen", K = 2,
spec = "longrun", season = 4)
sjf.vecm.rls <- cajorls(sjf.vecm, r = 2)
summary(sjf.vecm.rls$rlm)
sjf.vecm.rls$beta

Data set for Denmark, Johansen and Juselius (1990)

Description

This data set contains the series used by S. Johansen and K. Juselius for estimating a money demand function of Denmark.

Usage

data(denmark)

Format

A data frame with 55 observations on the following 6 variables.

period Time index from 1974:Q1 until 1987:Q3.
LRM Logarithm of real money, M2.
LRY Logarithm of real income.
LPY Logarithm of price deflator.
IBO Bond rate.
IDE Bank deposit rate.

Author(s)

Bernhard Pfaff

Source

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.


Macroeconomic data of the Euro Zone

Description

This data set contains some macroeconomic figures of the Euro Zone in order to estimate an exemplary money demand function.

Usage

data(ecb)

Format

A data frame containing five series.

period Time index from Q31997 until Q42003.
gdp.defl Gross Domestic Product Deflator,
[Index 2000=100, seasonally adjusted]
gdp.nom Nominal Gross Domestic Product,
[Current prices, EUR billions, seasonally adjusted]
m3 Monetary Aggregate M3,
[outstanding amount at end of quarter, EUR billions, seasonally adjusted]
rl Benchmark Government Bond yield with a maturity of 10 years,
[percentages per annum, average of last quarter's month].

Author(s)

Bernhard Pfaff

Source

European Central Bank, Monthly Bulletins, Frankfurt am Main, Germany.

References

https://www.ecb.europa.eu


Data set for Finland, Johansen and Juseliues (1990)

Description

This data set contains the series used by S. Johansen and K. Juselius for estimating a money demand function of Finland.

Usage

data(finland)

Format

A data frame with 106 observations on the following 4 variables, ranging from 1958:Q2 until 1984:Q3.

lrm1 Logarithm of real money, M1.
lny Logarithm of real income.
lnmr Marginal rate of interest.
difp Inflation rate.

Author(s)

Bernhard Pfaff

Source

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.


Likelihood ratio test for no linear trend in VAR

Description

Conducts a likelihood ratio test for no inclusion of a linear trend in a VAR. That is, the Null hypothesis is for not including a linear trend and is assigned as 'H2*(r)'. The test statistic is distributed as χ2\chi^2 square with (pr)(p-r) degrees of freedom.

Usage

lttest(z, r)

Arguments

z

An object of class ‘ca.jo’.

r

The count of cointegrating relationships.

Details

The count of cointegrating relations should be given as integer and should be in the interval 1r<P1 \leq r < P.

Value

lttest

Matrix containing the value of the test statistic and its p-value.

Author(s)

Bernhard Pfaff

References

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

Johansen, S. (1991), Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models, Econometrica, Vol. 59, No. 6, 1551–1580.

See Also

ca.jo and ca.jo-class.

Examples

data(denmark)
sjd <- as.matrix(denmark[, c("LRM", "LRY", "IBO", "IDE")])
sjd.vecm <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",
season=4)
lttest(sjd.vecm, r=1)
#
data(finland)
sjf <- as.matrix(finland)
sjf.vecm <- ca.jo(sjf, ecdet = "none", type="eigen", K=2,
spec="longrun", season=4)
lttest(sjf.vecm, r=3)

MacKinnon's Unit Root p Values

Description

A collection and description of functions to compute the distribution and and quantile function for MacKinnon's unit root test statistics.

The functions are:

punitroot the returns cumulative probability,
qunitroot the returns quantiles of the unit root test statistics,
unitrootTable tables p values from MacKinnon's response surface.

Usage

punitroot(q, N = Inf, trend = c("c", "nc", "ct", "ctt"), 
    statistic = c("t", "n"), na.rm = FALSE)
qunitroot(p, N = Inf, trend = c("c", "nc", "ct", "ctt"), 
    statistic = c("t", "n"), na.rm = FALSE)
    
unitrootTable(trend = c("c", "nc", "ct", "ctt"), statistic = c("t", "n"))

Arguments

N

the number of observations in the sample from which the quantiles are to be computed.

na.rm

a logical value. If set to TRUE, missing values will be removed otherwise not, the default is FALSE.

p

a numeric vector of probabilities. Missing values are allowed.

q

vector of quantiles or test statistics. Missing values are allowed.

statistic

a character string describing the type of test statistic. Valid choices are "t" for t-statistic, and "n" for normalized statistic, sometimes referred to as the rho-statistic. The default is "t".

trend

a character string describing the regression from which the quantiles are to be computed. Valid choices are: "nc" for a regression with no intercept (constant) nor time trend, and "c" for a regression with an intercept (constant) but no time trend, "ct" for a regression with an intercept (constant) and a time trend. The default is "c".

Value

The function punitroot returns the cumulative probability of the asymptotic or finite sample distribution of the unit root test statistics.

The function qunitroot returns the quantiles of the asymptotic or finite sample distribution of the unit root test statistics, given the probabilities.

Note

The function punitroot and qunitroot use Fortran routines and the response surface approach from J.G. MacKinnon (1988). Many thanks to J.G. MacKinnon putting his code and tables under the GPL license, which made this implementation possible.

Author(s)

J.G. MacKinnon for the underlying Fortran routine and the tables,
Diethelm Wuertz for the formerly Rmetrics R-port and Bernhard Pfaff for the porting to urca.

References

Dickey, D.A., Fuller, W.A. (1979); Distribution of the estimators for autoregressive time series with a unit root, Journal of the American Statistical Association 74, 427–431.

MacKinnon, J.G. (1996); Numerical distribution functions for unit root and cointegration tests, Journal of Applied Econometrics 11, 601–618.

Phillips, P.C.B., Perron, P. (1988); Testing for a unit root in time series regression, Biometrika 75, 335–346.

Examples

## qunitroot -
   # Asymptotic quantile of t-statistic
   qunitroot(0.95, trend = "nc", statistic = "t")

## qunitroot -
   # Finite sample quantile of n-statistic
   qunitroot(0.95, N = 100, trend = "nc", statistic = "n") 
   
## punitroot -
   # Asymptotic cumulative probability of t-statistic
   punitroot(1.2836, trend = "nc", statistic = "t")

## punitroot -
   # Finite sample cumulative probability of n-statistic
   punitroot(1.2836, N = 100, trend = "nc", statistic = "n")
   
## Mac Kinnon's unitrootTable -
   unitrootTable(trend = "nc")

Nelson and Plosser extended data set

Description

This data set contains the fourteen U.S. economic time series used by Schotman and Dijk. All series are transformed by taking logarithms except for the bond yield. The sample period ends in 1988.

Usage

data(npext)

Format

A data frame containing fourteen series.

year Time index from 1860 until 1988.
realgnp Real GNP, [Billions of 1958 Dollars],
[1909 -- 1988]
nomgnp Nominal GNP,
[Millions of Current Dollars], [1909 -- 1988]
gnpperca Real Per Capita GNP,
[1958 Dollars], [1909 -- 1988]
indprod Industrial Production Index,
[1967 = 100], [1860 -- 1988]
employmt Total Employment,
[Thousands], [1890 -- 1988]
unemploy Total Unemployment Rate,
[Percent], [1890 -- 1988]
gnpdefl GNP Deflator,
[1958 = 100], [1889 -- 1988]
cpi Consumer Price Index,
[1967 = 100], [1860 -- 1988]
wages Nominal Wages
(Average annual earnings per full-time employee in manufacturing),
[current Dollars], [1900 -- 1988]
realwag Real Wages,
[Nominal wages/CPI], [1900 -- 1988]
M Money Stock (M2),
[Billions of Dollars, annual averages], [1889 -- 1988]
velocity Velocity of Money,
[1869 -- 1988]
interest Bond Yield (Basic Yields of 30-year corporate bonds),
[Percent per annum], [1900 -- 1988]
sp500 Stock Prices,
[Index; 1941 -- 43 = 100], [1871 -- 1988]

Author(s)

Bernhard Pfaff

Source

Schotman, P.C. and van Dijk, H.K. (1991), On Bayesian Routes to Unit Roots, Journal of Applied Econometrics, 6, 387–401.

Koop, G. and Steel, M.F.J. (1994), A Decision-Theoretic Analysis of the Unit-Root Hypothesis using Mixtures of Elliptical Models, Journal of Business and Economic Statistics, 12, 95–107.

References

https://www.amstat.org


Nelson and Plosser original data set

Description

This data set contains the fourteen U.S. economic time series used by Nelson and Plosser in their seminal paper.

Usage

data(nporg)

Format

A data frame containing fourteen series.

year Time index from 1860 until 1970.
gnp.r Real GNP,
[Billions of 1958 Dollars], [1909 -- 1970]
gnp.n Nominal GNP,
[Millions of Current Dollars], [1909 -- 1970]
gnp.pc Real Per Capita GNP,
[1958 Dollars], [1909 -- 1970]
ip Industrial Production Index,
[1967 = 100], [1860 -- 1970]
emp Total Employment,
[Thousands], [1890 -- 1970]
ur Total Unemployment Rate,
[Percent], [1890 -- 1970]
gnp.p GNP Deflator,
[1958 = 100], [1889 -- 1970]
cpi Consumer Price Index,
[1967 = 100], [1860 -- 1970]
wg.n Nominal Wages
(Average annual earnings per full-time employee in manufacturing),
[current Dollars], [1900 -- 1970]
wg.r Real Wages,
[Nominal wages/CPI], [1900 -- 1970]
M Money Stock (M2),
[Billions of Dollars, annual averages], [1889 -- 1970]
vel Velocity of Money,
[1869 -- 1970]
bnd Bond Yield (Basic Yields of 30-year corporate bonds),
[Percent per annum], [1900 -- 1970]
sp Stock Prices,
[Index; 1941 -- 43 = 100], [1871 -- 1970]

Author(s)

Bernhard Pfaff

Source

Nelson, C.R. and Plosser, C.I. (1982), Trends and Random Walks in Macroeconomic Time Series, Journal of Monetary Economics, 10, 139–162.

References

http://korora.econ.yale.edu/phillips/index.htm


Methods for Function plot in Package urca

Description

Plot methods for objects belonging to classes set in package urca. Depending on the unit root/cointegration test a suitable graphical presentation is selected.

Methods

x = "ur.ers", y = "missing"

Diagram of fit of the Elliott, Rothenberg and Stock unit root test of type "DF-GLS" with residual plot and their acfs' and pacfs'.

x = "ur.kpss", y = "missing"

Residual plot and their acfs' and pacfs' of the KPSS test.

x = "ca.jo", y = "missing"

Time series plots and associated cointegration relations for the Johansen procedure.

x = "ca.po", y = "missing"

Residual plot and their acfs' and pacfs' of the cointegration regression(s) for the Phillips and Ouliaris test.

x = "ur.pp", y = "missing"

Diagram of fit of the Phillips and Perron unit root test, residual plot and their acfs' and pacfs'.

x = "ur.sp", y = "missing"

Diagram of fit of the Schmidt and Phillips unit root test, residual plot and their acfs' and pacfs'.

x = "ur.za", y = "missing"

Plot of recursive t-statistics as outcome of Zivot and Andrews unit root test.

Author(s)

Bernhard Pfaff

See Also

ur.ers-class, ur.kpss-class, ca.jo-class, ca.po-class, ur.pp-class, ur.sp-class and ur.za-class.

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
gnp.l <- log(gnp)
#
ers.gnp <- ur.ers(gnp, type="DF-GLS", model="trend", lag.max=4)
plot(ers.gnp)
#
kpss.gnp <- ur.kpss(gnp.l, type="tau", lags="short")
plot(kpss.gnp)
#
pp.gnp <- ur.pp(gnp, type="Z-tau", model="trend", lags="short")
plot(pp.gnp)
#
sp.gnp <- ur.sp(gnp, type="tau", pol.deg=1, signif=0.01)
plot(sp.gnp)
#
za.gnp <- ur.za(gnp, model="both", lag=2)
plot(za.gnp)
#
data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet="const", type="eigen", K=2, season=4)
plot(sjd.vecm)

Graphical inspection of VECM residuals

Description

The function plotres should be used for graphical inspection of the VAR residuals, i.e. the estimated specification as elaborated in the ‘Details’ section of ca.jo. It displays the residuals for each equation within a VAR and their acf's and pacf's.

Usage

plotres(x)

Arguments

x

Object of class ‘ca.jo’.

Author(s)

Bernhard Pfaff

References

Johansen, S. and Juselius, K. (1990), Maximum Likelihood Estimation and Inference on Cointegration – with Applications to the Demand for Money, Oxford Bulletin of Economics and Statistics, 52, 2, 169–210.

See Also

ca.jo and ca.jo-class.

Examples

data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet="const", type="eigen", K=2, spec="longrun",
season=4)
plotres(sjd.vecm)

Data set used by Dickey, Jansen and Thornton (1994)

Description

This data set contains the time series used by David A. Dickey, Dennis W. Jansen and Daniel L. Thornton in their article: “A Primer on Cointegrating with an Application to Money and Income”.

Usage

data(Raotbl1)

Format

A data frame with quarterly oberservations (ts objects) starting in 1953:1 until 1988:4 for the following 4 variables (all transformed to natural logarithms.

k Ratio of currency to total checkable deposits.
ksa seasonally adjusted series of k.
r3m Nominal 3 month T-Bill rate.
r10y Nominal yield on 10-year Government securities.
rgnp Real GNP.

Author(s)

Bernhard Pfaff

Source

Dickey, David A., Dennis W. Jansen and Daniel L. Thornton (1994), A Primer on Cointegration with an Application to Money and Income, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 2, Data Appendix, Table D.1.


Data set used by Dickey, Jansen and Thornton (1994)

Description

This data set contains the time series used by David A. Dickey, Dennis W. Jansen and Daniel L. Thornton in their article: “A Primer on Cointegrating with an Application to Money and Income”.

Usage

data(Raotbl2)

Format

A data frame with quarterly oberservations (ts objects) starting in 1953:1 until 1988:4 for the following 4 variables (all transformed to natural logarithms.

m1p Real money balances M1.
m2p Real money balances M2.
mbp Real adjusted monetary base.
nm1m2p Real non-M1 component of M2.

Author(s)

Bernhard Pfaff

Source

Dickey, David A., Dennis W. Jansen and Daniel L. Thornton (1994), A Primer on Cointegration with an Application to Money and Income, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 2, Data Appendix, Table D.2.


Data set used by Holden and Perman (1994)

Description

This data set contains the time series used by Darryl Holden and Roger Perman in their article: “Unit Roots and Cointegration for the Economist".

Usage

data(Raotbl3)

Format

A data frame with quarterly data (ts objects) from the United Kingdom starting in 1966:4 until 1991:2 for the following 6 variables (all transformed to natural logarithms).

lc Real consumption expenditure.
li Real income.
lw Real wealth.
dd682 Dummy variable for 68:2.
dd792 Dummy variable for 79:2.
dd883 Dummy variable for 88:3.

More details about the data are provided in the data appendix of Rao, “Cointegration for the Applied Economist" (see source below).

Author(s)

Bernhard Pfaff

Source

Holden, Darryl and Roger Perman (1994), Unit Roots and Cointegration for the Economist, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 3, Data Appendix, Table D.3.


Data set used by Pierre Perron (1994)

Description

This data set contains the time series used by Pierre Perron in his article: “Trend, Unit Root and Structural Change in Macroeconomic Time Series".

Usage

data(Raotbl4)

Format

A data frame on real aggregate output for various countries; annual data starting in 1870 until 1986.

aus Australia.
can Canada.
den Denmark.
fin Finland.
fra France.
ger Germany.

For further details about the data see Notes in the data appendix ‘Table D.5’ of Rao, “Cointegration for the Applied Economist".

Author(s)

Bernhard Pfaff

Source

Pierre Perron (1994), Trend, Unit Root and Structural Change in Macroeconomic Time Series, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 4, Data Appendix, Table D.4.


Data set used by Pierre Perron (1994)

Description

This data set contains the time series used by Pierre Perron in his article: ”Trend, Unit Root and Structural Change in Macroeconomic Time Series".

Usage

data(Raotbl5)

Format

A data frame on real aggregate output for various countries; annual data starting in 1870 until 1986.

ita Italy.
nor Norway.
swe Sweden.
ukg United Kingdom.
usa United States of America.

For further details about the data see Notes in the data appendix ‘Table D.5’ of Rao, “Cointegration for the Applied Economist".

Author(s)

Bernhard Pfaff

Source

Pierre Perron (1994), Trend, Unit Root and Structural Change in Macroeconomic Time Series, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 4, Data Appendix, Table D.5.


Data set used by Yash P. Mehra (1994)

Description

This data set contains quarterly data for the U.S.A. in Yash P. Mehra's article: “Wage Growth and the Inflation Process: An Empirical Approach" for his wage-price equations.

Usage

data(Raotbl6)

Format

A data frame with quarterly data from 1959:1 until 1989:3.

rgnp Real GNP.
pgnp Potential real GNP.
ulc Unit labor cost.
gdfco Fixed weight deflator for personal consumption expenditure excluding food and energy.
gdf Fixed weight GNP deflator.
gdfim Fixed weight import deflator.
gdfcf Fixed weight deflator for food in personal consumption expenditure.
gdfce Fixed weight deflator for energy in personal consumption expenditure.

Further details about the data can be found in the data appendix of Rao, “Cointegration for the Applied Economist".

Author(s)

Bernhard Pfaff

Source

Yash P. Mehra (1994), Wage Growth and the Inflation Process: An Empirical Approach, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 5, Data Appendix, Table D.6.


Data set used by Glenn Otto (1994)

Description

This data set contains Canadian quarterly data used by Glenn Otto in his article: “Diagnostic Testing: An Application to the Demand for M1".

Usage

data(Raotbl7)

Format

A data frame with quarterly data from 1956:1 until 1988:4.

m1 Money stock M1.
p Implicit price deflator for GDP, 1981=100.
gdp GDP at constant 1981 prices.
r 90-day prime corporate rate.

Author(s)

Bernhard Pfaff

Source

Glenn Otto (1994), Diagnostic Testing: An Application to the Demand for M1, in: Cointegration for the Applied Economist, ed. B. Bhaskara Rao, chapter 6, Data Appendix, Table D.6.


Methods for Function show in Package ‘urca’

Description

Displays the outcome of the unit root/cointegration tests.

Methods

object = "ca.jo"

Displays the test statistic of the Johansen procedure.

object = "cajo.test"

Displays the test statistic of a restricted VAR with respect to α\bold{\alpha} and/or β\bold{\beta}.

object = "ca.po"

Displays the test statistic of the Phillips and Ouliaris cointegration test.

object = "ur.df"

Displays the test statistic of the Augmented, Dickey and Fuller unit root test.

object = "ur.ers"

Displays the test statistic of the Elliott, Rothenberg and Stock unit root test.

object = "ur.kpss"

Displays the test statistic of the Kwiatkowski et al. unit root test.

object = "ur.pp"

Displays the test statistic of the Phillips and Perron unit root test.

object = "ur.df"

Displays the test statistic of the augmented Dickey-Fuller unit root test.

object = "ur.sp"

Displays the test statistic of the Schmidt and Phillips unit root test.

object = "ur.za"

Displays the test statistic of the Zivot and Andrews unit root test.

object = "sumurca"

Displays the summary output.

Author(s)

Bernhard Pfaff

See Also

ca.jo-class, cajo.test-class, ca.po-class, ur.ers-class, ur.kpss-class, ur.pp-class, ur.sp-class, ur.df-class and ur.za-class.

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
gnp.l <- log(gnp)
#
ers.gnp <- ur.ers(gnp, type="DF-GLS", model="trend", lag.max=4)
show(ers.gnp)
#
kpss.gnp <- ur.kpss(gnp.l, type="tau", lags="short")
show(kpss.gnp)
#
pp.gnp <- ur.pp(gnp, type="Z-tau", model="trend", lags="short")
show(pp.gnp)
#
df.gnp <- ur.df(gnp, type="trend", lags=4)
show(df.gnp)
#
sp.gnp <- ur.sp(gnp, type="tau", pol.deg=1, signif=0.01)
show(sp.gnp)
#
za.gnp <- ur.za(gnp, model="both", lag=2)
show(za.gnp)
#
data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
sjd.vecm <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, season=4)
show(sjd.vecm)
#
HD0 <- matrix(c(-1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1), c(5,4))
show(blrtest(sjd.vecm, H=HD0, r=1))

Function to show objects of classes for unit root tests

Description

The function show.urca is called within the defined methods for classes ca.jo, cajo.test, ca.po, ur.df, ur.ers, ur.kpss, ur.po, ur.pp, ur.df, ur.sp and ur.za.

Usage

show.urca(object)

Arguments

object

Object of class contained in urca.

Details

This function is called by method show.

Value

The Name and test statistic of a unit root/cointegration test.

Author(s)

Bernhard Pfaff


Methods for Function summary in Package ‘urca’

Description

Summarises the outcome of unit root/cointegration tests by creating a new object of class sumurca.

Methods

object = "ur.df"

The test type, its statistic, the test regression and the critical values for the Augmented Dickey and Fuller test are returned.

object = "ur.ers"

The test type, its statistic and the critical values for the Elliott, Rothenberg and Stock test are returned. In case of test "DF-GLS" the summary output of the test regression is provided, too.

object = "ur.kpss"

The test statistic, the critical value as well as the test type and the number of lags used for error correction for the Kwiatkowski et al. unit root test is returned.

object = "ca.jo"

The "trace" or "eigen" statistic, the critical values as well as the eigenvalues, eigenvectors and the loading matrix of the Johansen procedure are reported.

object = "cajo.test"

The test statistic of a restricted VAR with respect to α\bold{\alpha} and/or β\bold{\beta} with p-value and degrees of freedom is reported. Furthermore, the restriction matrix(ces), the eigenvalues and eigenvectors as well as the loading matrix are returned.

object = "ca.po"

The "Pz" or "Pu" statistic, the critical values as well as the summary output of the test regression for the Phillips and Ouliaris cointegration test.

object = "ur.pp"

The Z statistic, the critical values as well as the summary output of the test regression for the Phillips and Perron test, as well as the test statistics for the coefficients of the deterministic part is returned.

object = "ur.df"

The relevant tau statistic, the critical values as well as the summary output of the test regression for the augmented Dickey-Fuller test is returned.

object = "ur.sp"

The test statistic, the critical value as well as the summary output of the test regression for the Schmidt and Phillips test is returned.

object = "ur.za"

The test statistic, the critical values as well as the summary output of the test regression for the Zivot and Andrews test is returned.

Author(s)

Bernhard Pfaff

See Also

ur.ers-class, ur.kpss-class, ca.jo-class, cajo.test-class, ca.po-class, ur.pp-class, ur.df-class, ur.sp-class, ur.za-class and sumurca-class.

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
gnp.l <- log(gnp)
#
ers.gnp <- ur.ers(gnp, type="DF-GLS", model="trend", lag.max=4)
summary(ers.gnp)
#
kpss.gnp <- ur.kpss(gnp.l, type="tau", lags="short")
summary(kpss.gnp)
#
pp.gnp <- ur.pp(gnp, type="Z-tau", model="trend", lags="short")
summary(pp.gnp)
#
df.gnp <- ur.df(gnp, type="trend", lags=4)
summary(df.gnp)
#
sp.gnp <- ur.sp(gnp, type="tau", pol.deg=1, signif=0.01)
summary(sp.gnp)
#
za.gnp <- ur.za(gnp, model="both", lag=2)
summary(za.gnp)
#
data(finland)
sjf <- finland
sjf.vecm <- ca.jo(sjf, ecdet="none", type="eigen", K=2, season=4)
summary(sjf.vecm)
#
HF0 <- matrix(c(-1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), c(4,3))
summary(blrtest(sjf.vecm, H=HF0, r=3))

Representation of class sumurca

Description

A class for objects returned by applying method summary() to objects from classes: ur.ers, ca.jo, cajo.test, ur.kpss, ca.po, ur.pp, ur.df, ur.sp or ur.za.

Slots

classname:

The class name of the original object to which method summary is applied.

test.name:

The name of the test, i.e. ‘Johansen-Procedure’.

testreg:

The test regression where applicable, otherwise set to NULL.

teststat:

The test statististic where applicable, otherwise set to NULL.

cval:

The critical values of the test where applicable, otherwise set to NULL.

bpoint:

Potential break point where applicable, otherwise set to NULL.

signif:

Significance level of the test where applicable, otherwise set to NULL.

model:

Description of the underlying model where applicable, otherwise set to NULL.

type:

The test type where applicable, otherwise set to NULL.

auxstat:

The result of an auxiliary regression where applicable, otherwise set to NULL.

lag:

The number of lags included where applicable, otherwise set to NULL.

H:

The matrix containing the restrictions placed upon β\bold{\beta} where applicable, otherwise set to NULL.

A:

The matrix containing the restrictions placed upon α\bold{\alpha} where applicable, otherwise set to NULL.

lambda:

The eigenvalues where applicable, otherwise set to NULL.

pval:

The p-value and the degrees of freedom where applicable, otherwise set to NULL.

V:

The matrix of eigenvectors, normalised with respect to the first variable where applicable, otherwise set to NULL.

W:

The matrix of loading weights where applicable, otherwise set to NULL.

P:

The count of variables where applicable, otherwise set to NULL.

Methods

For this class a print method is available, that nicely prints the summary results of objects belonging to either one of the following classes: ur.ers, ca.jo, cajo.test, ur.kpss, ca.po, ur.pp, ur.df, ur.sp or ur.za.

Author(s)

Bernhard Pfaff

See Also

summary, ur.ers-class, ur.kpss-class, ca.jo-class, cajo.test-class, ca.po-class, ur.pp-class, ur.df-class, ur.sp-class and ur.za-class.


Data set for the United Kingdom

Description

This data set contains the series used by Hylleberg, S., R. F. Engle, C. W. J. Granger and B. S. Yoo (1990), Seasonal Integration and Cointegration, Journal of econometrics, 44, 215–238.

Usage

data(UKconinc)

Format

A data frame of quarterly data ranging from 1955:Q1 until 1984:Q4. The data is expressed in natural logarithms.

consl The log of total real consumption in the U.K.
incl The log of real disposable income in the U.K.

Author(s)

Bernhard Pfaff

Source

Journal of Applied Econometrics Data Archive http://qed.econ.queensu.ca/jae/

References

Hylleberg, S., R. F. Engle, C. W. J. Granger and B. S. Yoo (1990), Seasonal Integration and Cointegration, Journal of econometrics, 44, 215–238.


Data set for the United Kingdom

Description

This data set contains the series used by in Charemza, W. (1997), New Directions in Econometric Practice, 2nd edition, Edward Elgar, Cheltenha, Uk. for analysing private in the United Kingdom.

Usage

data(UKconsumption)

Format

A data frame of quarterly ts objects ranging from 1957:Q1 until 1975:Q4.

cons Consumers` non-durable expenditure in the U.K. in 1970 prices.
inc Personal disposable income in the U.K. in 1970 prices.
price Consumers` expenditure deflator index, 1970=100.

Author(s)

Bernhard Pfaff

Source

Pokorny, M. (1987), An Introduction to Econometrics, page 408, Basil Blackwell Ltd. Original data source: Economic Trends, Annual Supplements, 1976 and 1981, HMSO.

References

Charemza, W. (1997), New Directions in Econometrics Practice, 2nd edition, Edward Elgar, Cheltenham, U.K.


Data set for the United Kingdom: ppp and uip

Description

This data set contains the series used by in Johansen and Juselius (1992), Testing structural hypothesis in a multivariate cointegration analysis of the PPP and UIP for UK, Journal of Econometrics, 53, 211-244.

Usage

data(UKpppuip)

Format

A data frame of quarterly data ranging from 1971:Q1 until 1987:Q2. All variables are expressed in logarithms.

p1 UK wholesale price index.
p2 Trade weighted foreign whole sale price index.
e12 UK effective exchange rate.
i1 Three-month treasury bill rate in the UK.
i2 Three-month Eurodollar interest rate.
dpoil0 World oil price at period t.
dpoil1 World oil price at period t-1.

Author(s)

Bernhard Pfaff

References

Johansen, S. and K. Juselius (1992), Testing structural hypothesis in a multivariate cointegration analysis of the PPP and UIP for UK, Journal of Econometrics, 53, 211-244.


Augmented-Dickey-Fuller Unit Root Test

Description

Performs the augmented Dickey-Fuller unit root test.

Usage

ur.df(y, type = c("none", "drift", "trend"), lags = 1,
      selectlags = c("Fixed", "AIC", "BIC"))

Arguments

y

Vector to be tested for a unit root.

type

Test type, either "none", "drift" or "trend".

lags

Number of lags for endogenous variable to be included.

selectlags

Lag selection can be achieved according to the Akaike "AIC" or the Bayes "BIC" information criteria. The maximum number of lags considered is set by lags. The default is to use a "fixed" lag length set by lags.

Details

The function ur.df() computes the augmented Dickey-Fuller test. If type is set to "none" neither an intercept nor a trend is included in the test regression. If it is set to "drift" an intercept is added and if it is set to "trend" both an intercept and a trend is added. The critical values are taken from Hamilton (1994) and Dickey and Fuller(1981).

Value

An object of class ur.df.

Author(s)

Bernhard Pfaff

References

Dickey, D. A. and Fuller, W. A. (1979), Distributions of the Estimators For Autoregressive Time Series with a Unit Root, Journal of the American Statistical Association, 75, 427–431.

Dickey, D. A. and Fuller, W. A. (1981), Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root, Econometrica, 49, 1057–1072.

Hamilton (1994), Time Series Analysis, Princeton University Press.

See Also

ur.df-class.

Examples

data(Raotbl3)
attach(Raotbl3)
lc.df <- ur.df(y=lc, lags=3, type='trend')
summary(lc.df)

Representation of class ur.df

Description

This class contains the relevant information by applying the augmented Dickey-Fuller unit root test to a time series.

Slots

y:

Object of class "vector": The time series to be tested.

model:

Object of class "character": The type of the deterministic part, either "none", "drift" or "trend". The latter includes a constant term, too.

lags:

Object of class "integer": Number of lags for error correction.

cval:

Object of class "matrix": Critical values at the 1%, 5% and 10% level of significance.

teststat:

Object of class "matrix": Value of the test statistic.

testreg:

Object of class "ANY": The summary output of the test regression.

res:

Object of class "vector": The residuals of the test regression.

test.name:

Object of class "character": The name of the test, i.e ‘Augmented-Dickey-Fuller Test’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ur.df") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but critical value and summary of test regression added.

plot:

Residual plot, acfs' and pacfs'.

Author(s)

Bernhard Pfaff

References

Dickey, D. A. and Fuller, W. A. (1979), Distributions of the Estimators For Autoregressive Time Series with a Unit Root, Journal of the American Statistical Association, 75, 427–431.

Dickey, D. A. and Fuller, W. A. (1981), Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root, Econometrica, 49, 1057–1072.

Hamilton (1994), Time Series Analysis, Princeton University Press.

See Also

ur.df and urca-class


Elliott, Rothenberg and Stock Unit Root Test

Description

Performs the Elliott, Rothenberg and Stock unit root test.

Usage

ur.ers(y, type = c("DF-GLS", "P-test"), model = c("constant", "trend"),
       lag.max = 4)

Arguments

y

Vector to be tested for a unit root.

type

Test type, either "DF-GLS" (default), or "P-test".

model

The deterministic model used for detrending.

lag.max

The maximum numbers of lags used for testing of a decent lag truncation for the "P-test" (BIC used), or the maximum number of lagged differences to be included in the test regression for "DF-GLS".

Details

To improve the power of the unit root test, Elliot, Rothenberg and Stock proposed a local to unity detrending of the time series. ERS developed a feasible point optimal test, "P-test", which takes serial correlation of the error term into account. The second test type is the "DF-GLS" test, which is an ADF-type test applied to the detrended data without intercept. Critical values for this test are taken from MacKinnon in case of model="constant" and else from Table 1 of Elliot, Rothenberg and Stock.

Value

An object of class ur.ers.

Author(s)

Bernhard Pfaff

References

Elliott, G., Rothenberg, T.J. and Stock, J.H. (1996), Efficient Tests for an Autoregressive Unit Root, Econometrica, Vol. 64, No. 4, 813–836.

MacKinnon, J.G. (1991), Critical Values for Cointegration Tests, Long-Run Economic Relationships, eds. R.F. Engle and C.W.J. Granger, London, Oxford, 267–276.

See Also

ur.ers-class

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
ers.gnp <- ur.ers(gnp, type="DF-GLS", model="const", lag.max=4)
summary(ers.gnp)

Representation of class ur.ers

Description

This class contains the relevant information by applying the Elliott, Rothenberg and Stock unit root test.

Slots

y:

Object of class "vector": The time series to be tested.

yd:

Object of class "vector": The detrended time series.

type:

Object of class "character": Test type, either "DF-GLS" (default), or "P-test".

model:

Object of class "character": The deterministic model used for detrending, either intercept only, or intercept with linear trend.

lag:

Object of class "integer": The number of lags used in the test/auxiliary regression.

cval:

Object of class "matrix": The critical values of the test at the 1%, 5% and 10% level of significance.

teststat:

Object of class "numeric": The value of the test statistic.

testreg:

Object of class "ANY": The test regression, only set for "DF-GLS".

test.name:

Object of class "character": The name of the test, i.e. ‘Elliott, Rothenberg and Stock’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ur.ers") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but test type, test regression (type="DF-GLS") and critical values added.

plot:

Diagram of fit, residual plot and their acfs' and pacfs' for type="DF-GLS".

Author(s)

Bernhard Pfaff

References

Elliott, G., Rothenberg, T.J. and Stock, J.H. (1996), Efficient Tests for an Autoregressive Unit Root, Econometrica, Vol. 64, No. 4, 813–836.

MacKinnon, J.G. (1991), Critical Values for Cointegration Tests, Long-Run Economic Relationships, eds. R.F. Engle and C.W.J. Granger, London, Oxford, 267–276.

See Also

ur.ers and urca-class.


Kwiatkowski et al. Unit Root Test

Description

Performs the KPSS unit root test, where the Null hypothesis is stationarity. The test types specify as deterministic component either a constant "mu" or a constant with linear trend "tau".

Usage

ur.kpss(y, type = c("mu", "tau"), lags = c("short", "long", "nil"),
        use.lag = NULL)

Arguments

y

Vector to be tested for a unit root.

type

Type of deterministic part.

lags

Maximum number of lags used for error term correction.

use.lag

User specified number of lags.

Details

lags="short" sets the number of lags to 4×(n/100)4\sqrt[4]{4 \times (n/100)}, whereas lags="long" sets the number of lags to 12×(n/100)4\sqrt[4]{12 \times (n/100)}. If lags="nil" is choosen, then no error correction is made. Furthermore, one can specify a different number of maximum lags by setting use.lag accordingly.

Value

An object of class ur.kpss.

Author(s)

Bernhard Pfaff

References

Kwiatkowski, D., Phillips, P.C.B., Schmidt, P. and Shin, Y., (1992), Testing the Null Hypothesis of Stationarity Against the Alternative of a Unit Root: How Sure Are We That Economic Time Series Have a Unit Root?, Journal of Econometrics, 54, 159–178.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.kpss-class

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
gnp.l <- log(gnp)
kpss.gnp <- ur.kpss(gnp.l, type="tau", lags="short")
summary(kpss.gnp)

Representation of class ur.kpss

Description

This class contains the relevant information by applying the Kwiatkowski, Phillips, Schmidt and Shin unit root test to a time series.

Slots

y:

Object of class "vector": The time series to be tested.

type:

Object of class "character": Test type, "mu" or "tau" depending on the deterministic part.

lag:

Object of class "integer": Number of lags for error term correction.

cval:

Object of class "matrix": Critical value of test.

teststat:

Object of class "numeric": Value of test statistic.

res:

Object of class "vector": Residuals of test regression.

test.name:

Object of class "character": The name of the test, i.e. ‘KPSS’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ur.kpss") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but critical values, lags and test type added.

plot:

Residual plot and their acfs' and pacfs'.

Author(s)

Bernhard Pfaff

References

Kwiatkowski, D., Phillips, P.C.B., Schmidt, P. and Shin, Y., (1992), Testing the Null Hypothesis of Stationarity Against the Alternative of a Unit Root: How Sure Are We That Economic Time Series Have a Unit Root?, Journal of Econometrics, 54, 159–178.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.kpss and urca-class.


Phillips and Perron Unit Root Test

Description

Performs the Phillips and Perron unit root test. Beside the Z statistics Z-alpha and Z-tau, the Z statistics for the deterministic part of the test regression are computed, too.

Usage

ur.pp(x, type = c("Z-alpha", "Z-tau"), model = c("constant", "trend"),
      lags = c("short", "long"), use.lag = NULL)

Arguments

x

Vector to be tested for a unit root.

type

Test type, either "Z-alpha" or "Z-tau".

model

Determines the deterministic part in the test regression.

lags

Lags used for correction of error term.

use.lag

Use of a different lag number, specified by the user.

Details

The function ur.pp() computes the Phillips and Perron test. For correction of the error term a Bartlett window is used.

Value

An object of class ur.pp.

Author(s)

Bernhard Pfaff

References

Phillips, P.C.B. and Perron, P. (1988), Testing for a unit root in time series regression, Biometrika, 75(2), 335–346.

MacKinnon, J.G. (1991), Critical Values for Cointegration Tests, Long-Run Economic Relationships, eds. R.F. Engle and C.W.J. Granger, London, Oxford, 267–276.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.pp-class.

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
pp.gnp <- ur.pp(gnp, type="Z-tau", model="trend", lags="short")
summary(pp.gnp)

Representation of class ur.pp

Description

This class contains the relevant information by applying the Phillips and Perron unit root test to a time series.

Slots

y:

Object of class "vector": The time series to be tested.

type:

Object of class "character": Test type of Z statistic, either "Z-alpha" or "Z-tau".

model:

Object of class "character": The type of the deterministic part, either "constant" or "trend". The latter includes a constant term, too.

lag:

Object of class "integer": Number of lags for error correction.

cval:

Object of class "matrix": Critical values at the 1%, 5% and 10% level of significance.

teststat:

Object of class "numeric": Value of the test statistic.

testreg:

Object of class "ANY": The summary output of the test regression.

auxstat:

Object of class "matrix": Test statistic(s) of the deterministic part.

res:

Object of class "vector": The residuals of the test regression.

test.name:

Object of class "character": The name of the test, i.e ‘Phillips-Perron’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ur.pp") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but critical value and summary of test regression added.

plot:

Diagram of fit plot, residual plot and their acfs' and pacfs'.

Author(s)

Bernhard Pfaff

References

Phillips, P.C.B. and Perron, P. (1988), Testing for a unit root in time series regression, Biometrika, 75(2), 335–346.

MacKinnon, J.G. (1991), Critical Values for Cointegration Tests, Long-Run Economic Relationships, eds. R.F. Engle and C.W.J. Granger, London, Oxford, 267–276.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.pp and urca-class


Schmidt and Phillips Unit Root Test

Description

Performs the Schmidt and Phillips unit root test, where under the Null and Alternative Hypothesis the coefficients of the deterministic variables are included.

Usage

ur.sp(y, type = c("tau", "rho"), pol.deg = c(1, 2, 3, 4),
      signif = c(0.01, 0.05, 0.1))

Arguments

y

Vector to be tested for a unit root.

type

Test type, either tau or rho test.

pol.deg

Degree of polynomial in the test regression.

signif

Significance level for the critical value of the test statistic.

Details

Under the Null and the Alternative hypothesis the coefficients of the deterministic part of the test regression are included. Two test types are available: the rho-test and the tau-test. Both test are extracted from the LM principle.

Value

An object of class "ur.sp".

Author(s)

Bernhard Pfaff

References

Schmidt, P. and Phillips, P.C.B. (1992), LM Test for a Unit Root in the Presence of Deterministic Trends, Oxford Bulletin of Economics and Statistics, 54(3), 257–287.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.sp-class

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
sp.gnp <- ur.sp(gnp, type="tau", pol.deg=1, signif=0.01)
summary(sp.gnp)

Representation of class ur.sp

Description

This class contains the relevant information by applying the Schmidt and Phillips unit root test to a time series.

Slots

y:

Object of class "vector": The time series to be tested.

type:

Object of class "character": Test type, "rho" or "tau" test statistic.

polynomial:

Object of class "integer": Deterministic trend specification

signif:

Object of class "numeric": Critical values.

teststat:

Object of class "numeric": Value of the test statistic.

cval:

Object of class "numeric": The critical values, depending on "signif", "polynomial" and the sample size.

res:

Object of class "vector": The residuals of the test regression.

testreg:

Object of class "ANY": The summary output of the test regression.

test.name:

Object of class "character": The name of the test, i.e. ‘"Schmidt and Phillips’.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ur.sp") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic.

summary:

like show, but critical value and summary of test regression added.

plot:

Diagram of fit plot, residual plot and their acfs' and pacfs'.

Author(s)

Bernhard Pfaff

References

Schmidt, P. and Phillips, P.C.B. (1992), LM Test for a Unit Root in the Presence of Deterministic Trends, Oxford Bulletin of Economics and Statistics, 54(3), 257–287.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.sp and urca-class.


Zivot and Andrews Unit Root Test

Description

Performs the Zivot and Andrews unit root test, which allows a break at an unknown point in either the intercept, the linear trend or in both.

Usage

ur.za(y, model = c("intercept", "trend", "both"), lag=NULL)

Arguments

y

Vector to be tested for a unit root.

model

Specification if the potential break occured in either the intercept, the linear trend or in both.

lag

The highest number of lagged endogenous differenced variables to be included in the test regression

Details

This test is based upon the recursive estimation of a test regression. The test statistic is defined as the minimum t-statistic of the coeffcient of the lagged endogenous variable.

Value

An object of class ur.za.

Author(s)

Bernhard Pfaff

References

Zivot, E. and Andrews, Donald W.K. (1992), Further Evidence on the Great Crash, the Oil-Price Shock, and the Unit-Root Hypothesis, Journal of Business and Economic Statistics, 10(3), 251–270.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.za-class

Examples

data(nporg)
gnp <- na.omit(nporg[, "gnp.r"])
za.gnp <- ur.za(gnp, model="both", lag=2)
summary(za.gnp)

Representation of class ur.za

Description

This class contains the relevant information by applying the Zivot and Andrews unit root test to a time series.

Slots

y:

Object of class "vector": The time series to be tested.

model:

Object of class "character": The model to be used, i.e. intercept, trend or both

lag:

Object of class "integer": The highest number of lags to include in the test regression.

teststat:

Object of class "numeric": The t-statistic.

cval:

Object of class "vector": Critical values at the 1%, 5% and 10% level of significance.

bpoint:

Object of class "integer": The potential break point.

tstats:

Object of class "vector" The t-statistics of the rolling regression.

res:

Object of class "vector" The residuals of the test regression.

test.name:

Object of class "character" The name of the test, i.e. ‘Zivot and Andrews’.

testreg:

Object of class "ANY" The summary output of the test regression.

Extends

Class urca, directly.

Methods

Type showMethods(classes="ur.za") at the R prompt for a complete list of methods which are available for this class.

Useful methods include

show:

test statistic and critical values.

summary:

like show, but summary of test regression added.

plot:

plot of recursive t-statistics.

Author(s)

Bernhard Pfaff

References

Zivot, E. and Andrews, Donald W.K. (1992), Further Evidence on the Great Crash, the Oil-Price Shock, and the Unit-Root Hypothesis, Journal of Business and Economic Statistics, 10(3), 251–270.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.za and urca-class.


Class ‘urca’. Parent of classes in package ‘urca’

Description

This class is the parent class of the specific classes designed holding the test specific information of the unit root/cointegration tests.

Objects from the Class

Objects can be created by calls of the form new("urca", ...), but most often the slot test.name is set by calling one of the unit root/cointegration functions, e.g ur.za.

Slots

test.name:

Object of class "character". The name of the unit root/cointegration test.

Methods

No methods defined with class ‘urca’.

Author(s)

Bernhard Pfaff

See Also

ur.ers-class, ur.kpss-class, ca.jo-class, ca.po-class, ur.pp-class, ur.sp-class and ur.za-class.


Critical values for Schmidt and Phillips Unit Root Test

Description

This function is an internal function and is called by ur.sp. It computes the critical value of the Schmidt and Phillips test, given a level of significance, the polynomial degree of the test regression, the test type and the sample size.

Usage

.spcv(obs, type, pol.deg, signif)

Arguments

obs

The sample size.

type

The test type.

pol.deg

The polynomial degree.

signif

The significance level.

Value

The critical value of the test.

Author(s)

Bernhard Pfaff

References

Schmidt, P. and Phillips, P.C.B. (1992), LM Test for a Unit Root in the Presence of Deterministic Trends, Oxford Bulletin of Economics and Statistics, 54(3), 257–287.

Download possible at: https://cowles.yale.edu/, see rubric 'Discussion Papers (CFDPs)'.

See Also

ur.sp.