Publications by Economics and R - R posts

Update: Finding Economic Articles With Data

30.06.2019

An earlier post from February, describes a Shiny app that allows to search among currently more than 4000 economic articles that have an accessible data and code supplement. Finally, I managed to configure an nginx reverse proxy server and now you can also access the app under a proper https link here: https://ejd.econ.mathematik.uni-ulm.de (I wa...

2311 sym R (2890 sym/4 pcs) 4 img 2 tbl

RTutor: Improving Interactive Problem Sets by Analyzing Submissions

05.08.2019

At Ulm University, we currently use RTutor for several elective courses where students solve interactive problem sets at home. They can test their solutions and get automatic hints, and then submit their solution. Starting next year, we plan to use RTutor in a new compulsory data science project course in our business and economics bachelor. For ...

6927 sym R (4770 sym/11 pcs) 2 img 1 tbl

Game theory in R with the new gtree package

04.09.2019

gtree is a new R package that allows to specify extensive form games using stages, similar as one specifies economic experiments with ztree or otree. Let us specify a simple ultimatum game in gtree. A proposer can offer the responder between 0 and 10 Euros. If the responder accepts the offer, the proposer keeps 10 Euro minus the proposed amount. ...

4131 sym R (3249 sym/5 pcs) 2 img

RStudio Addin: Replace in Files

03.10.2019

When developing a new R project, I usually want to quickly get some examples running. This means in early stages, I don’t spend much time to consistently name my functions or variables. Correspondingly, there is usually a later phase, before making the project public, in which I change a lot of function names in order to get a bit more consiste...

2165 sym R (103 sym/1 pcs) 4 img

Analyzing Relational Contracts with R: Part I

10.12.2019

One goal of game theory is to understand how effective cooperation can be sustained in relationships. You may have heard of Axelrod’s famous tournaments that studied how effective different submitted strategies are in sustaining cooperation in repeated Prisoners’ dilemma games. A related approach to understand the scope for cooperation in rel...

15051 sym R (2041 sym/10 pcs) 10 img

Exploring EU wide data on new car registrations and CO2 efficiency

17.12.2019

I just found out that here the EU made large data sets available about every newly registered car in the EU (currently from 2012 to 2018). The data set from 2018 has over 15 million rows and many rows correspond to a single registered car. The following analysis uses a smaller data set that aggregated the original huge data sets by grouping on un...

8329 sym R (4868 sym/11 pcs) 18 img 1 tbl

glueformula: simply build regression formulas from vectors with variable names

09.01.2020

The small new package glueformula with a single function gf facilitates constructing regression formulas from vectors with variable names. The syntax is similar to glue strings. Here is an example: # Example: build a formula # for ivreg with gf library(glueformula) # Contol variables and instruments contr = c("x1","x2","x3","log(x4)") instr = c...

1112 sym R (296 sym/1 pcs) 2 img

Exploring the tightened EU CO2 emission standards for cars in 2020 – Why now selling an electric car can be worth an extra 18000€ for producers.

14.01.2020

In this blog post I want to explore the EU regulation for average CO2 emissions of manufacturer’s car fleets using the EU data set of newly registered cars. The data was already studied on an aggregate level in my earlier post. Here we explore, in particular, the monetary implications of the regulatory details for different car manufactures and...

25659 sym R (15131 sym/27 pcs) 28 img 1 tbl

Please, somebody create an ETF that buys EU CO2 emission allowances! I’d like the gamble to earn money by fighting climate change.

05.02.2020

I really would like to buy now EU CO2 allowances and keep them for 5-20 years before selling them back. This transaction is likely to reduce total EU CO2 emissions and I would even have the chance to make some money out of it. That one can actually reduce emission (rather than only postpone them) just by holding allowances for some years seems st...

13924 sym R (861 sym/4 pcs) 6 img

Analyzing Relational Contracts with R: Part 2

02.03.2020

This post continues my first post on game theoretic analysis with the package RelationalContacts in R. Here we look at more complex infinite horizon games with endogenous states. I also illustrate how one can explicitly combine relational contracting and hold-up concerns. The following code specifies a game with 3 states: library(RelationalContra...

14807 sym R (7831 sym/19 pcs) 8 img