Publications by Economics and R - R posts
Data on energy consumption and CO2 emissions
I like to start my courses in energy economics and environmental economics by asking some question like Which energy source, e.g. gas, coal, nuclear, oil, renewables had the largest absolute increase in world wide energy consumption between the years 2000 und 2016? And then show some data. Below you can see an updated version of a googleVis vis...
2827 sym
P-Values, Sample Size and Data Mining
Recently, a paper was presented at our university that showed a significant effect for a variable of interest but had a relatively small number of observations. One colleague suggested that we should consider the significance of the results with care since the number of observations was fairly small. This ignited some discussion. Given that the s...
8070 sym R (3191 sym/5 pcs) 8 img
Interactive RTutor Problemsets via RStudio Cloud
I just learned about RStudio Cloud (see https://rstudio.cloud/) that allows to simply run RStudio instances from your browser. Moreover, you can simply set-up RStudio projects that other users can simply copy and use themselves. RStudio Cloud is still in alpha and currently one can freely register to use it. I have set up a project that allows yo...
4722 sym R (55 sym/1 pcs) 8 img
About a Curious Feature and Interpretation of Linear Regressions
A small blog post with a riddle, simulation, theory and a concluding rhyme. Consider a fictitious example in which we have collected a sample of somewhat overweight persons for which we measured weight in kg as $y$ and height in cm as $x$. We estimate the following simple linear regression: One early message in our Economics 101 course is that fo...
6442 sym R (1032 sym/8 pcs) 6 img
RTutor: Driving Electric or Gasoline Cars? Comparing the Pollution Damages
How does driving an electric car compare to driving a similar gasoline car in terms of total pollution damages? While some comments about the future of mobility may suggest that electric cars are already clearly much more environmental friendly, the answer is not at all clear cut and depends on a lot of factors. For example, how does one weight l...
2942 sym 4 img
RTutor: Better Incentive Contracts For Road Construction
Since about two weeks, I face a large additional traffic jam every morning due to a construction site on the road. When passing the construction site, often only few people or sometimes nobody seems to be working there. Being an economist, I really wonder how much of such traffic jams could be avoided with better contracts that give the construct...
3020 sym 4 img
Finding Economic Articles With Data
In my view, one of the greatest developments during the last decade in economics is that the Journals of the American Economic Association and some other leading journals require authors to upload the replication code and data sets of accepted articles. I wrote a Shiny app that allows to search currently among more than 3000 articles that have an...
5167 sym R (1202 sym/8 pcs) 6 img 4 tbl
Finding Economic Articles With Data
In my view, one of the greatest developments during the last decade in economics is that the Journals of the American Economic Association and some other leading journals require authors to upload the replication code and data sets of accepted articles. I wrote a Shiny app that allows to search currently among more than 3000 articles that have an...
5167 sym R (1202 sym/8 pcs) 6 img 4 tbl
An Interesting Subtlety of Statistics: The Hot Hand Fallacy Fallacy
Last week I stumbled across a very interesting recent Econometrica article by Joshua Miller and Adam Sanjuro. I was really surprised by the statistical result they discovered and guess the issue may even have fooled Nobel Prize winning behavioral economists. Before showing the statistical subtlety, let me briefly explain the Hot Hand Fallacy. Con...
7503 sym R (2760 sym/9 pcs) 2 img 2 tbl
Why use RTutor for interactive tutorials if there is RStudio’s learnr?
There are nowadays different options to create interactive R tutorials that allow users to type in code, automatically check their solution and get hints if they are stuck. Two options are RStudio’s learnr package and my RTutor package. Obviously, RStudio has a great track record for creating and continously supporting awesome software and R p...
7603 sym R (529 sym/4 pcs) 2 img