prepate_data {sectorgap} | R Documentation |
Input data
Description
Prepares the required input data, it performs the transformations to the raw data and computes the necessary weights for the constraints.
Usage
prepate_data(
settings,
tsl,
tsl_n = NULL,
tsl_p = NULL,
ts_start = NULL,
ts_end = NULL,
extend_weights = FALSE
)
Arguments
settings |
list with model setting, in the format returned by the
function |
tsl |
time series list with all untransformed endogenous series |
tsl_n |
time series list with nominal level series for aggregate output
|
tsl_p |
time series list with price series for aggregate output
|
ts_start |
start date, e.g. |
ts_end |
end date, e.g. |
extend_weights |
logical indicating if missing weights at beginning/end of sample should be filled with the last/first available value |
Details
Either tsl_n
or tsl_p
must be supplied.
Weights are forward/backward extended with the first/last value if the supplied time series do not cover the entire period.
Value
A list with five components:
tsm |
multiple time series object with all (transformed) endogeneous variables |
real |
multiple time series object with real series of
|
nominal |
multiple time series object with nominal series of
|
prices |
multiple time series object with price series of
|
weights_growth |
list of multiple time series objects with weights for
the growth constraints, i.e., for series |
weights_level |
list of multiple time series objects with weights for
the non linear level constraints, i.e., for series
|
Examples
data("data_ch")
settings <- initialize_settings()
data <- prepate_data(
settings = settings,
tsl = data_ch$tsl,
tsl_n = data_ch$tsl_n
)