-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from bsvars/conditional-forecast
Conditional forecast
- Loading branch information
Showing
12 changed files
with
457 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
#' @title Data containing conditional projections for growth rate of GDP (dgdp) | ||
#' for 189 United Nations countries from 2024 to 2029 | ||
#' | ||
#' @description For each of the countries a time series of 6 observations on | ||
#' GDP growth rates (sgdp) #' formatted so they is provided to generate | ||
#' conditional forecasts of labour market outcomes given the provided projected | ||
#' paths of output. Last data update was implemented on 2024-05-11. | ||
#' | ||
#' @usage data(ilo_conditional_forecast) | ||
#' | ||
#' @format A list of 189 \code{ts} objects with time series of 6 observations | ||
#' on 4 variables: | ||
#' \describe{ | ||
#' \item{UR}{unemployment rate - contains missing values} | ||
#' \item{EPR}{annual employment rate - contains missing values} | ||
#' \item{LFPR}{annual labour force participation rate - contains missing values} | ||
#' \item{dgdp}{annual growth rate of gross domestic product - contains projected | ||
#' values} | ||
#' } | ||
#' | ||
#' @source | ||
#' International Labour Organization. (2020). ILO modelled estimates database, | ||
#' ILOSTAT [database]. Available from \url{https://ilostat.ilo.org/data/}. | ||
#' | ||
#' @examples | ||
#' data(ilo_conditional_forecast) # upload the data | ||
#' | ||
"ilo_conditional_forecast" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
# Create ILO conditional forecasts from provided files | ||
library(dplyr) | ||
|
||
# this file contains a cubic panel dynamic dataset | ||
all_cv <- read.csv("inst/varia/ilo_cubic_panel.csv") | ||
colnames(all_cv) = c("year", "iso3code", "country", "UR", "EPR", "LFPR", "dgdp") | ||
|
||
# all variables all countries | ||
data_cv <- all_cv %>% | ||
filter(year >= 2024) %>% | ||
select(year, iso3code, UR, EPR, LFPR, dgdp) | ||
|
||
# Create a list with the country data | ||
countries = unique(data_cv$iso3code) | ||
countries = countries[order(countries)] | ||
ilo_conditional_forecast = list() | ||
for (i in 1:length(countries)) { | ||
ilo_conditional_forecast[[i]] <- data_cv %>% | ||
filter(iso3code == countries[i]) %>% | ||
select(UR, EPR, LFPR, dgdp) %>% | ||
ts(start = 2024, frequency = 1) | ||
names(ilo_conditional_forecast)[i] <- countries[i] | ||
} | ||
|
||
save(ilo_conditional_forecast, file = "data/ilo_conditional_forecast.rda") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.