nardl Package Cointegration bounds test
pssbounds(obs, fstat, tstat = NULL, case, k)
Dynamic multipliers plot
Dynamic multiplier plot
An R package to estimate the nonlinear cointegrating pssbounds specification include: plotmplier(model, np, k, h)
autoregressive distributed lag model • Case case number 3 for (unrestricted intercert, no trend) and 5 Methods and options are:
(unrestricted intercept, unrestricted trend), 1 2 and 4 not
supported •model the fitted model
Specifying the Model • fstat represent the value of the F-statistic •np the selected number of lags
• obs represent the number of observation •k number of decomposed independent variables
Possible syntaxes for specifying the variables in the model:
• k number of regressors appearing in lag levels •h is the horizon over which multipliers will be computed
• nardl with fixed p and q lags Example
nardl(fod~inf,p,q,data=fod,ic="aic",maxlags = FALSE,graph = Example:
reg<-nardl(food~inf,fod,ic="aic",maxlags = TRUE,graph = reg<-nardl(food~inf,p=4,q=4,fod,ic="aic",maxlags =
FALSE,case=3)
TRUE,case=3) FALSE,graph = TRUE,case=3)
• Auto selected lags (maxlags=TRUE)
pssbounds(case=reg$case,fstat=reg$fstat,obs=reg$obs,k=reg$k) plotmplier(reg,reg$np,1,10)
nardl(food~inf,data=fod,ic="aic",maxlags = TRUE,graph =
FALSE,case=3)
LM test for serial correlation
The formula:
LM test for serial correlation
• y~x | z1+z2….
• y the dependent variable bp2(object, nlags, fill = NULL, type = c("F", "Chi2"))
• x the decomposed variable ( this package version can’t •Methods and options are:
assume more than one decomposed variable)
• object fitted lm model
•z1+z2+… independent variables
• nlags positive integer number of lags
• Data is the dataframe
• fill starting values for the lagged residuals in the auxiliary
• p number of lags of the dependent variable regression. By default 0.
• q number of lags of the independent variables •type Fisher or Chisquare statistics
• ic : c("aic","bic","ll","R2") criteria model selection Example : pssbounds
reg<-nardl(food~inf,fod,ic="aic",maxlags = TRUE,graph =
• maxlags if TRUE auto lags selection TRUE,case=3)
pssbound function display the necessary critical values to
• case case number 3 for (unrestricted intercert, no trend)
bp2(reg$fit,reg$np,fill=0,type="F") conduct the Pesaran, Shin and Smith 2001 bounds test for
and 5 (unrestricted intercept, unrestricted trend), 1 2 and
cointegration. See http://andyphilips.github.io/pssbounds/.
4 not supported
Lagrange multiplier test pssbounds(obs, fstat, tstat = NULL, case, k)
Cusum and CusumQ plot
Lagrange multiplier test for conditional heteroscedasticity of
Cusum and CusumQ plot (graph=TRUE) Engle (1982), as described by Tsay (2005, pp. 101-102) Methods and options are:
nardl(food~inf,data=fod,ic="aic",maxlags = TRUE,graph = •obs number of observations
ArchTest(x, lags = 12, demean = FALSE) •fstat value of the F-statistic
TRUE,case=3)
•tstat value of the t-statistic
• Methods and options are: •case case number
• x numeric vector •k number of regressors appearing in lag levels
• lags positive integer number of lags.
Example
• demaen logical: If TRUE, remove the mean before
computing the test statistic. reg<-nardl(food~inf,fod,ic="aic",maxlags = TRUE,graph =
TRUE,case=3)
Example : pssbounds(case=reg$case,fstat=reg$fstat,obs=reg$obs,k=reg$k)
reg<-nardl(food~inf,fod,ic="aic",maxlags = TRUE,graph = # F-stat concludes I(1) and cointegrating, t-stat concludes I(0).
TRUE,case=3)
x<-reg$selresidu
nlag<-reg$np
ArchTest(x,lags=nlag)
This is one page presents the nardl package. Taha Zaghdoudi package version 0.1.5 https://github.com/zedtaha/nardl CC BY Taha Zaghdoudi
https://creativecommons.org/licenses/by/4.0/