DataForEstimation {MultiATSM} | R Documentation |
Retrieve data from Excel and build the database used in the model estimation
Description
Retrieve data from Excel and build the database used in the model estimation
Usage
DataForEstimation(
t0,
tF,
Economies,
N,
FactorLabels,
ModelType,
DataFrequency,
W_type = NULL,
t_First_Wgvar = NULL,
t_Last_Wgvar = NULL,
DataPathMacro = NULL,
DataPathYields = NULL,
DataPathTrade = NULL
)
Arguments
t0 |
Sample starting date (yyyy-mm-dd) |
tF |
Sample last date (yyyy-mm-dd) |
Economies |
string-vector containing the names of the economies which are part of the economic system |
N |
Number of country-specific spanned factor (scalar) |
FactorLabels |
String-list based which contains the labels of all the variables present in the model |
ModelType |
String-vector containing the label of the model to be estimated |
DataFrequency |
Character-based-vector. Avaialable options are: "Daily All Days", "Daily Business Days", "Weekly", "Monthly", "Quarterly", "Annually" |
W_type |
Three possibilities:
|
t_First_Wgvar |
Sample starting date (year) |
t_Last_Wgvar |
Sample last date (year) |
DataPathMacro |
Path of the Excel file conating the macroeconomic data (if any). The default is linked to the excel file present in the package. |
DataPathYields |
Path of the Excel file conating the yields data (if any). The default is linked to the excel file present in the package. |
DataPathTrade |
Path of the Excel file conating the trade data (if any). The default is linked to the excel file present in the package. |
Value
A list containing the
time series of the complete set of bond yields (matrix, JxT or CJxT);
time series of the complete set risk factors (matrix, KxT);
'GVARFactors': list of all variables that are used in the estimation of the VARX
(see e.g. 'CM_Factors_GVAR' file). If the estimated model type is not GVAR-based, then returns NULL.
Examples
DomVar <- c("Eco_Act", "Inflation")
GlobalVar <- c("GBC", "CPI_OECD")
t0 <- "2006-09-01"
tF <- "2019-01-01"
Economies <- c("China", "Brazil", "Mexico", "Uruguay", "Russia")
N <- 2
ModelType <- "JPS"
FactorLabels <- LabFac(N, DomVar, GlobalVar, Economies, ModelType)
DataFrequency <- "Monthly"
DataModel <- DataForEstimation(t0, tF, Economies, N, FactorLabels, ModelType, DataFrequency)