**Economics and R - R posts**, and kindly contributed to R-bloggers)

What is the real world impact of tv series? Did Brazilian women get fewer children because they watched soap operas that portray happy, rich families that have few children?

Clara Ulmer has written a very nice RTutor problem set that allows you interactively explore this question in R. It is based on the paper

While correlations between two time series can be quickly found, the challenge in many econometric studies is to convincingly establish causal effects. The main analysis is based on a micro data panel data set that contains births and background characteristics for Brazilian woman over several years. The analysis exploits the fact that the relevant TV broadcast company entered at different points of time in different regions.

The regression analysis starts with Exercise 4. Subsequently you can explore many robustness checks (e.g. placebo regressions), that make actually a quite convincing case for the presence of a causal effect of soap operas on fertility.

The panel data analysis in the problem set extensively uses the R package lfe. In my view `lfe`

is quite a nice package, that allows to quickly run multiway fixed effect regressions on considerably large data sets. In addition, many functionality that empirical economists commonly use, like instrumental variables or clustered robust standard errors can be very conveniently accessed. For economists that currently use Stata but are thinking of moving to R, the `lfe`

package may be removing some considerable obstacles. You can check it out in Clara's problem set.

Here is a screenshot:

To install and try out the problem set locally, follow the instructions here:

https://github.com/ClaraUlmer/RTutorSoapOperas

There is also an online version hosted by shinyapps.io that allows you explore the problem set without any local installation. (The online version is capped at 30 hours total usage time per month. So it may be greyed out when you click at it.)

https://claraulmer.shinyapps.io/RTutorSoapOperas

If you want to learn more about RTutor, to try out other problem sets, or to create a problem set yourself, take a look at the RTutor Github page

https://github.com/skranz/RTutor

**leave a comment**for the author, please follow the link and comment on their blog:

**Economics and R - R posts**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...