Package MARX. June 16, 2017

Similar documents
Package MARX. April 24, 2018

Package DBfit. October 25, 2018

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package BiDimRegression

Package gppm. July 5, 2018

Package BayesCR. September 11, 2017

Package nonnest2. January 23, 2018

Package datasets.load

Package MSwM. R topics documented: February 19, Type Package Title Fitting Markov Switching Models Version 1.

Package palmtree. January 16, 2018

Package GWRM. R topics documented: July 31, Type Package

Package addhaz. September 26, 2018

Package VarReg. April 24, 2018

Package REndo. November 8, 2017

Package abe. October 30, 2017

Package StVAR. February 11, 2017

Package freeknotsplines

Package endogenous. October 29, 2016

Package catenary. May 4, 2018

Package tidylpa. March 28, 2018

Package modmarg. R topics documented:

Package ICsurv. February 19, 2015

Package robets. March 6, Type Package

Package mfbvar. December 28, Type Package Title Mixed-Frequency Bayesian VAR Models Version Date

Repeated Measures Part 4: Blood Flow data

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Stat 500 lab notes c Philip M. Dixon, Week 10: Autocorrelated errors

Package basictrendline

Package TVsMiss. April 5, 2018

INTRODUCTION TO PANEL DATA ANALYSIS

Package svapls. February 20, 2015

Package bayeslongitudinal

Package Rglpk. May 18, 2017

Package glmmml. R topics documented: March 25, Encoding UTF-8 Version Date Title Generalized Linear Models with Clustering

Package FWDselect. December 19, 2015

Package truncreg. R topics documented: August 3, 2016

Package stapler. November 27, 2017

Package oglmx. R topics documented: May 5, Type Package

Package EBglmnet. January 30, 2016

Package intccr. September 12, 2017

Package libstabler. June 1, 2017

Package rfsa. R topics documented: January 10, Type Package

Package fastdummies. January 8, 2018

Package ellipse. January 6, 2018

Package capushe. R topics documented: April 19, Type Package

Package vinereg. August 10, 2018

Package fcr. March 13, 2018

Package SiZer. February 19, 2015

Package autovarcore. June 4, 2018

Package enpls. May 14, 2018

Package IATScore. January 10, 2018

Package lcc. November 16, 2018

Package nsprcomp. August 29, 2016

Package scarabee. August 22, 2014

Package funitroots. November 16, 2017

Time-Varying Volatility and ARCH Models

Lab Session 1. Introduction to Eviews

Intro to E-Views. E-views is a statistical package useful for cross sectional, time series and panel data statistical analysis.

Package PSTR. September 25, 2017

Package hyphenatr. August 29, 2016

A faster model selection criterion for OP-ELM and OP-KNN: Hannan-Quinn criterion

Package sfadv. June 19, 2017

Package longclust. March 18, 2018

Package SEMrushR. November 3, 2018

Package ssmn. R topics documented: August 9, Type Package. Title Skew Scale Mixtures of Normal Distributions. Version 1.1.

Package FMsmsnReg. March 30, 2016

Package bisect. April 16, 2018

Discussion Notes 3 Stepwise Regression and Model Selection

Package rpst. June 6, 2017

Package BigVAR. R topics documented: April 3, Type Package

Package estprod. May 2, 2018

Package ecoseries. R topics documented: September 27, 2017

Package ordinalcont. January 10, 2018

Package TSrepr. January 26, Type Package Title Time Series Representations Version Date

Package cosinor. February 19, 2015

NCSS Statistical Software

STA121: Applied Regression Analysis

Package pampe. R topics documented: November 7, 2015

Package samplesizecmh

Package pcr. November 20, 2017

Package pdfetch. October 15, 2017

Package bife. May 7, 2017

Package ArCo. November 5, 2017

Package msgps. February 20, 2015

An Econometric Study: The Cost of Mobile Broadband

Package ecotox. June 28, 2018

Package validara. October 19, 2017

Package GUTS. R topics documented: October 10, Type Package

Package clipr. June 23, 2018

Package mixphm. July 23, 2015

Package colf. October 9, 2017

Bivariate (Simple) Regression Analysis

Package ECctmc. May 1, 2018

Lecture 13: Model selection and regularization

Package iccbeta. January 28, 2019

Package OrthoPanels. November 11, 2016

Package sparsenetgls

Package psda. September 5, 2017

Package simr. April 30, 2018

Package TBSSurvival. January 5, 2017

Transcription:

Package MARX June 16, 2017 Title Simulation, Estimation and Selection of MARX Models Version 0.1 Date 2017-06-16 Author [aut, cre, cph], Alain Hecq [ctb], Lenard Lieb [ctb] Maintainer <j.telg@maastrichtuniversit.nl> Simulate, estimate (b t-mle) and select mied causal-noncausal autoregressive models with possibl eogenous regressors, using methods proposed in Lanne and Saikkonen (2011) <doi:10.2202/1941-1928.1080> and Hecq et al. (2016) <doi:10.15609/annaeconstat2009.123-124.0307>. Imports matlab, fbasics, tseries, stabledist License GPL-2 Encoding UTF-8 LazData true RogenNote 5.0.1 NeedsCompilation no Repositor CRAN Date/Publication 2017-06-16 20:10:49 UTC R topics documented: aic.............................................. 2 ar.ls............................................. 3 bic.............................................. 4 commodit......................................... 4 hq.............................................. 5 inference.......................................... 6 ll.ma............................................ 7 mar............................................. 8 mar.t............................................ 9 mied............................................ 10 pseudo............................................ 11 1

2 aic regressor.matri....................................... 12 selection.lag......................................... 13 selection.lag.lead...................................... 13 sim.mar.......................................... 14 Inde 16 aic The Akaike information criterion (AIC) function This function allows ou to calculate the Akaike information criteria (AIC) for ARX models. aic(,, p_ma) p_ma Matri of data (ever column represents one time series). Specif NULL or Maimum number of autoregressive terms to be included. p values Lag order chosen b AIC. Vector containing values AIC for p = 0 up to p_ma. data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) aic(data$, data$,8)

ar.ls 3 ar.ls The ARX estimation b OLS function This function allows ou to estimate ARX models b ordinar least squares (OLS). ar.ls(,, p) p Matri of data (ever column represents one time series). Specif NULL or Number of autoregressive terms to be included. coefficients coef.auto coef.eo mse residuals loglikelihood fitted.values df vcov Vector of estimated coefficients. Vector of estimated autoregressive parameters. Vector of estimated eogenous parameters. Mean squared error. Residuals. of the loglikelihood. Fitted values. Degrees of freedom. Variance-covariance matri of residuals. data <- sim.mar(c('t',3,0),c('t',1,1),100,0.5,0.4,0.3) ar.ls(data$,data$,2)

4 commodit bic The Baesian/Schwarz information criterion (BIC) function This function allows ou to calculate the Baesian/Schwarz information criteria (BIC) for ARX models. bic(,, p_ma) p_ma Matri of data (ever column represents one time series). Specif NULL or Maimum number of autoregressive terms to be included. p values Lag order chosen b BIC. Vector containing values BIc for p = 0 up to p_ma. data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) bic(data$, data$,8) commodit Data: Monthl growth rates of commodit prices, echange rate and industrial production inde. Monthl growth rates of commodit prices, echange rate and industrial production inde from Februar 1980 until October 2010. Levels of these series can be downloaded from IMF and Federal Reserve Bank of St. Louis. data("commodit")

hq 5 Format Source A data frame with 441 observations on the following 8 variables. X_date_ a vector with dates dlnbev a numeric vector dlnind a numeric vector dlnrawm a numeric vector dlnmeta a numeric vector dlnoil a numeric vector dlnipi a numeric vector dlne a numeric vector IMF Primar Commodit Prices (http://www.imf.org/eternal/np/res/commod/inde.asp) and Federal Reserve Bank of St. Louis (https://fred.stlouisfed.org). data(dataset) hq The Hannan-Quinn (HQ) information criterion function This function allows ou to calculate the Hannan-Quinn (HQ) information criteria for ARX models. hq(,, p_ma) p_ma Matri of data (ever column represents one time series). Specif NULL or Maimum number of autoregressive terms to be included. p values Lag order chosen b HQ. Vector containing values HQ for p = 0 up to p_ma.

6 inference data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) hq(data$, data$,8) inference Asmptotic inference for the MARX function This function allows ou to calculate standard errors and confidence intervals for parameters of the MARX model. inference(,, B_C, B_NC, B_, IC, sig, df, sig_level) B_C B_NC B_ IC sig df sig_level Matri of data (ever column represents one time series). Specif NULL or Estimated causal parameters of the MARX. Estimated noncausal parameters of the MARX. Estimated parameters of the eogenous variables in the MARX. Estimated intercept. Estimated scale parameter of the assumed underling Student-t distribution of the residuals. Estimated degrees of freedom of the assumed underling Student-t distribution of the residuals. Significance level for the construction of inference. CI.c CI.nc CI.eo CI.int se.c se.nc se.eo se.int Confidence intervals for causal parameters. Confidence intervals for noncausal parameters. Confidence intervals for eogenous parameters. Confidence interval for intercept. Standard errors of causal parameters. Standard errors of noncausal parameters. Standard errors of eogenous parameters. Standard error of intercept.

ll.ma 7 data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) <- data$ <- data$ res <- mar.t(,,1,1) inference(,,res$coef.c,res$coef.nc,res$coef.eo,res$coef.int,res$scale,res$df,0.05) ll.ma The value of the t-log-likelihood for MARX function This function allows ou to determine the value of the t-log-likelihood for the MARX model. ll.ma(params,,, p_c, p_nc) params p_c p_nc List of parameters. Matri of data (ever column represents one time series). Specif NULL or Number of lags. Number of leads. neg.loglikelihood Minus the loglikelihood. data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) <- data$ <- data$ p_c <- 1 p_nc <- 1 params <- c(0.5,0.4,0.3,0,1,1) ll.ma(params,,,p_c,p_nc)

8 mar mar The MARX function This interface-based function allows ou to perform model selection for MARX models based on information criteria. mar(,, p_ma, sig_level, p_c, p_nc) p_ma sig_level p_c p_nc Matri of data (ever column represents one time series). Specif NULL or Maimum number of autoregressive parameters (leads + lags) to be included. Significance level for the construction of inference. Number of lags (if not specified b the user a model selection procedure is used to determine the number of lags). Number of leads (if not specified b the user a model selection procedure is used to determine the number of leads). The function returns the values of the information criteria for the pseudo-causal models. The user is asked to choose a value for "p". Etensive output for the MARX(r,s,q) model (with p = r + s) which maimizes the log-likelihood is reported. data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) p_ma <- 8 sig_level <- 0.05 mar(data$, data$, p_ma, sig_level,1,1) ## p_c and p_nc chosen to be 1: MARX(1,1,1) output. mar(data$, NULL, p_ma,sig_level,1,1) ## MAR(1,1), no eogenous variable specified.

mar.t 9 mar.t The estimation of the MARX model b t-mle function This function allows ou to estimate the MARX model b t-mle. mar.t(,, p_c, p_nc, params0) p_c p_nc params0 Matri of data (ever column represents one time series). Specif NULL or Number of lags. Number of leads. Starting values for the parameters to be estimated (both model and distributional parameters). coef.c coef.nc coef.eo coef.int scale df residuals Estimated causal coefficients. Estimated noncausal coefficients. Estimated eogenous coefficients. Estimated intercept. Estimated scale parameter. Estimated degrees of freedom. Residuals. data <- sim.mar(c('t',3,0),c('t',3,1),100,0.5,0.4,0.3) mar.t(data$,data$,1,1)

10 mied mied The MARX estimation function This function allows ou to estimate mied causal-noncausal MARX models b t-mle (compatible with most functions in lm() class). mied(,, p_c, p_nc) ## Default S3 method: mied(,, p_c, p_nc) ## S3 method for class 'mied' print(,...) ## S3 method for class 'mied' summar(object,...) ## S3 method for class 'combine' mied(,, p_c, p_nc) p_c p_nc Matri of data (ever column represents one time series). Specif NULL or Number of lags to be included. Number of leads to be included.... Other parameters. object An object of the class "mied". An object of class "mied" is a list containing the following components: coefficients se df.residual residuals fitted.values Vector of estimated coefficients. Standard errors of estimated coefficients. Degrees of freedom residuals. Residuals. Fitted values.

pseudo 11 data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) object <- mied(data$, data$, 1, 1) class(object) <- "mied" summar(object) pseudo The pseudo-causal model function This function allows ou to estimate pseudo-causal ARX models b OLS (compatible with most functions in lm() class). pseudo(,, p) ## Default S3 method: pseudo(,, p) ## S3 method for class 'pseudo' print(,...) ## S3 method for class 'pseudo' summar(object,...) p Matri of data (ever column represents one time series). Specif NULL or Number of lags to be included.... Other arguments object An object of the class "pseudo" An object of class "pseudo" is a list containing the following components: coefficients coef.auto coef.eo mse residuals Vector of estimated coefficients. Vector of estimated autoregressive parameters. Vector of estimated eogenous parameters. Mean squared error. Residuals.

12 regressor.matri loglikelihood fitted.values df vcov of the loglikelihood. Fitted values. Degrees of freedom. Variance-covariance matri of residuals. data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) object <- pseudo(data$, data$, 2) class(object) <- "pseudo" summar(object) regressor.matri The regressor matri function This function allows ou to create a regressor matri. regressor.matri(,, p) p Matri of data (ever column represents one time series). Specif NULL or Number of autoregressive terms to be included. Z Regressor matri data <- sim.mar(c('t',3,0),c('t',1,1),100,0.5,0.4,0.3) regressor.matri(data$, data$, 2)

selection.lag 13 selection.lag The model selection for pseudo-arx function This function allows ou to calculate AIC, BIC, HQ for pseudo-arx models. selection.lag(,, p_ma) p_ma Matri of data (ever column represents one time series). Specif NULL or Maimum number of autoregressive terms to be included. bic aic hq Vector containing values BIC for p=0 up to p_ma. Vector containing values AIC for p=0 up to p_ma. vector containing values HQ for p=0 up to p_ma. data <- sim.mar(c('t',1,1), c('t',1,1),100,0.5,0.4,0.3) selection.lag(data$,data$,8) selection.lag.lead The lag-lead model selection for MARX function This function allows ou to determine the MARX model (for p = r + s) that maimizes the t-loglikelihood. selection.lag.lead(,, p_pseudo)

14 sim.mar p_pseudo Matri of data (ever column represents one time series). Specif NULL or Number of autoregressive terms to be included in the pseudo-causal model. p.c The number of lags selected. p.nc The number of leads selected. loglikelihood The value of the loglikelihood for all models with p = r + s. data <- sim.mar(c('t',3,0), c('t',3,0),100,0.5,0.4,0.3) selection.lag.lead(data$,data$,2) sim.mar The simulation of MARX processes This function allows ou to simulate MARX processes based on different underling distribution. sim.mar(dist.eps, dist., obs, c_par, nc_par, eo_par) dist.eps dist. obs c_par nc_par eo_par vector containing the error distribution and its parameters (options: t, normal, stable). vector containing the distribution of and its parameters (options: t, normal, stable). Specif NULL or Number of observations for simulated process. vector of causal parameters. vector of noncausal parameters. Parameter of the eogenous variable.

sim.mar 15 Simulated data. Simulated data (eogenous variable). dist.eps <- c('t',1,1) ## t-distributed errors with 1 degree of freedom and scale parameter 1 dist. <- c('normal',0,1) ## standard normall distributed variable obs <- 100 c_par <- c(0.2,0.4) nc_par <- 0.8 eo_par <- 0.5 sim.mar(dist.eps,dist.,obs,c_par,nc_par,eo_par) ## Simulates a MARX(2,1,1) process

Inde Topic causal-noncausal inference, 6 mar.t, 9 mied, 10 selection.lag.lead, 13 Topic datasets commodit, 4 Topic estimation ar.ls, 3 mar, 8 mar.t, 9 mied, 10 pseudo, 11 regressor.matri, 12 Topic inference inference, 6 Topic optimization ll.ma, 7 Topic pseudo-causal ar.ls, 3 pseudo, 11 selection.lag, 13 Topic selection aic, 2 bic, 4 hq, 5 mar, 8 selection.lag, 13 selection.lag.lead, 13 Topic simulation sim.mar, 14 hq, 5 inference, 6 ll.ma, 7 mar, 8 mar.t, 9 mied, 10 print.mied (mied), 10 print.pseudo (pseudo), 11 pseudo, 11 regressor.matri, 12 selection.lag, 13 selection.lag.lead, 13 sim.mar, 14 summar.mied (mied), 10 summar.pseudo (pseudo), 11 aic, 2 ar.ls, 3 bic, 4 commodit, 4 dataset (commodit), 4 16