create_data_structures: Create a data_structures object for the cointegrated VECM

Description Usage Arguments Value

View source: R/create_data_structures.R

Description

This function creates a central object of the package called the model frame. The model frame holds all the relevant data structures needed for further analysis.

Using the input information on lags, deterministic trends, rank and exogenous variables, the model frame creates variables central for estimation and inference, such as the summarizing variables known from Johansen(1996) pp. 90 denoted, $Z_0$, $Z_1$ and $Z_2$, as well as the concentrated variables $R_0$ and $R_1$. Finally the cornerstone sums of squares $S_ij$ are calculated and stored.

This function is private to the package and will only be invoked through other functions serving as interfaces.

Usage

1

Arguments

data

is an xts object with the data of interest. Exogenous variables are included by adding them to this data object and giving them a header name with the prefix x_. If an exogenous variable is restricted to lie within the cointegration relation, its name should have the prefix xr_

*Note* that certain exogenous variables, such as a constant can be introduced through the parameter trend and need not be specified as an exogenous variable. If the input data contains _missing values_, the row containing a missing value is deleted.

lags

are the number of lags (in levels - not differences) used in the model

Value

a model_frame class holding the relevant data objects for further analysis.


EmilNejst/Rcivecm documentation built on May 6, 2019, 3:47 p.m.