View source: R/plot_cond_forc.r
| plot_cond_forc | R Documentation |
plot_cond_forc function; Data should conatain the variable "variable", the "hor" horizon and a "history"
plot_cond_forc(
varbl2plot = NULL,
y_h_cond = NULL,
center = 0.5,
lower = 0.16,
upper = 0.84,
T.start = NULL,
T.end = NULL,
before = 8,
freq = "quarter",
y_data = NULL
)
varbl2plot |
name of variable to be plotted (string) |
y_h_cond |
conditional forecast data frame (eg from SimScen) with names c("hor","variable","lower","center","upper"): hor is a Date object |
center |
(optional, default 0.5) quantile of the mid value |
lower |
(optional, default 0.16) quantile of lower range |
upper |
(optional, default 0.84) quantile of upper range |
T.start |
start date of the forecast |
T.end |
end of the forecast |
before |
(integer: optional) periods of data in the plot: default 8 periods |
freq |
(optional, default 'quarter') frequency of the data (eg 'quarter' or 'month') |
y_data |
Data used in the estimation eg t(specification$get_data_matrices()$Y) %>% as.data.frame(); true_data$hor=dates |
list of plot and data used
## Not run:
# Example usage with conditional forecast data
plot_result <- plot_cond_forc(varbl2plot = "GDP",
y_h_cond = forecast_data,
T.start = as.Date("2023-01-01"),
T.end = as.Date("2024-01-01"),
y_data = historical_data)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.