library(readr)
library(readxl)
library(tidyverse)
library(stringr)
library(lubridate)
library(imputeTS)
library(devtools)
load_all()

Variables de EEUU

Productividad del Trabajo

Industrial Production: Manufacturing (NAICS)

Indice de producción industrial de EEUU

  • Fuente: Reserva Federal de Saint Louis
  • Frecuencia: cuatrimestral
  • Periodo: 1972 - 2019
  • Base 2012 = 100
  • Ajustado estacionalmente
  • ID serie: IP.GMF.S
base_manuf_us <- read_csv( "../data/manufacturing_production.csv")

Employment, Hours, and Earnings from the Current Employment Statistics survey (National)

Total de obreros ocupados del sector industrial.

  • Fuente: BLS
  • Frecuencia: mensual
  • Periodo: 1939 - 2019
  • Unidad: miles
  • Ajustado estacionalmente
  • ID serie: CES3000000001
base_employ_us <- read_csv("../data/employ.csv")

Nota: todos los números indices (cuyas variables se identifican con el prefijo “i_”) se construirán con año base enero 2017.

Creación de fechas y cambio de base

Índice de Precios al Consumidor

CPI for All Urban Consumers (CPI-U)

  • Fuente: BLS
  • Frecuencia: mensual
  • Periodo: 1947 - 2019
  • Base: ¿¿¿¿1981????
  • Ajustado estacionalmente
  • Observaciones: todos los ítems; promedio de las ciudades de EEUU
  • ID serie: CUSR0000SA0
base_ipc_us <- read_csv("../data/cpi.csv")
## Parsed with column specification:
## cols(
##   `Series ID` = col_character(),
##   Year = col_double(),
##   Period = col_character(),
##   Label = col_character(),
##   Value = col_double()
## )

Variables de Argentina

Producción manufacturera

Valor Agregado Bruto a precios básicos por rama de actividad económica en millones de pesos a precios corrientes. Base 2004

base_manuf_arg04 <- read_csv("../data/va_p_ctes_arg.csv")
## Parsed with column specification:
## cols(
##   .default = col_double(),
##   indice_tiempo = col_date(format = "")
## )
## See spec(...) for full column specifications.

Empleo

## # A tibble: 93 x 2
##    fecha i_empleo_arg
##    <dbl>        <dbl>
##  1 1996.        0.709
##  2 1996.        0.716
##  3 1996.        0.725
##  4 1996.        0.732
##  5 1997.        0.740
##  6 1997.        0.751
##  7 1997.        0.755
##  8 1997.        0.762
##  9 1998.        0.765
## 10 1998.        0.769
## # … with 83 more rows

Productividad

## # A tibble: 181 x 2
##    fecha      i_productividad_arg
##    <date>                   <dbl>
##  1 2004-01-01                1.17
##  2 2004-02-01                1.18
##  3 2004-03-01                1.19
##  4 2004-04-01                1.21
##  5 2004-05-01                1.20
##  6 2004-06-01                1.20
##  7 2004-07-01                1.20
##  8 2004-08-01                1.20
##  9 2004-09-01                1.19
## 10 2004-10-01                1.19
## # … with 171 more rows

Índice de precios al consumidor

Tipo de Cambio

## New names:
## * `` -> ...3
tc_mensual <- tc_dia_bcra %>%
 group_by(fecha=floor_date(fecha, "month")) %>% 
  summarise(tc_promedio_mes = mean(tc)) %>% 
  mutate(fecha=date(fecha)) #armar una nueva variable con TC a fin de mes

#promedios 59-72
promedios_59_72 <- read_csv("../data/promedios_59_72.txt") %>% spread(variable,valor)
## Parsed with column specification:
## cols(
##   variable = col_character(),
##   valor = col_double()
## )

TCP

## # A tibble: 213 x 13
##    fecha      tc_promedio_mes i_productividad… i_ipc_us i_productividad…
##    <date>               <dbl>            <dbl>    <dbl>            <dbl>
##  1 2002-03-01            2.40            0.719    0.732               NA
##  2 2002-04-01            2.86            0.726    0.735               NA
##  3 2002-05-01            3.33            0.730    0.736               NA
##  4 2002-06-01            3.62            0.734    0.737               NA
##  5 2002-07-01            3.61            0.738    0.738               NA
##  6 2002-08-01            3.62            0.741    0.740               NA
##  7 2002-09-01            3.64            0.744    0.742               NA
##  8 2002-10-01            3.65            0.747    0.743               NA
##  9 2002-11-01            3.53            0.752    0.745               NA
## 10 2002-12-01            3.49            0.757    0.746               NA
## # … with 203 more rows, and 8 more variables: i_ipc9 <dbl>,
## #   ipc_arg_b <dbl>, ipc_us_b <dbl>, ipt_arg_b <dbl>, ipt_us_b <dbl>,
## #   tcp_arbitrario <dbl>, sobrevaluacion <dbl>, tcp_definitivo <dbl>
## # A tibble: 35 x 5
##    fecha      tc_promedio_mes tcp_arbitrario sobrevaluacion tcp_definitivo
##    <date>               <dbl>          <dbl>          <dbl>          <dbl>
##  1 2017-01-01            15.9           22.4           1.54           24.5
##  2 2017-02-01            15.6           22.4           1.57           24.4
##  3 2017-03-01            15.5           22.3           1.57           24.4
##  4 2017-04-01            15.4           22.2           1.58           24.3
##  5 2017-05-01            15.7           23.2           1.62           25.4
##  6 2017-06-01            16.1           24.0           1.63           26.2
##  7 2017-07-01            17.2           24.3           1.55           26.6
##  8 2017-08-01            17.4           24.7           1.55           27.0
##  9 2017-09-01            17.2           24.4           1.54           26.6
## 10 2017-10-01            17.5           24.6           1.54           26.9
## # … with 25 more rows
## Warning: Removed 168 rows containing missing values (geom_path).