IOP Publishing
Browse (17.18 kB)
Download file

R-Code: Generation of SPEI data and estimation of drought effects on feed prices in South Germany

Download (17.18 kB)
posted on 2020-01-07, 11:46 authored by Sergei Schaub, Robert Finger

We provide here the R-code for the complete replication of Schaub and Finger (2019a). The code allows to i) download weather data from the German Meteorological Office, ii) extract weather information for the agricultural area of Germany, iii) compute the Standardized Precipitation Evapotranspiration Index (SPEI), iv) to estimate an SVAR model and v) to replicate figures and tables presented in Schaub and Finger (2019a). The code is structured into 1) a master file (‘r_master_script_feed_price_paper.R’), 2) a file for weather data preparation (‘r_weather_script_feed_price_paper.R’) and 3) a file for data preparation, estimation and visualization of results (‘r_estimation_script_feed_price_paper.R’). Please follow instructions in the master file when executing the code. The data for the replication can be found at Schaub and Finger (2019b).


Manuscript ID