Publications by Econometrics and Free Software

Why I find tidyeval useful

26.08.2017

First thing’s first: maybe you shouldn’t care about tidyeval. Maybe you don’t need it. If you exclusively work interactively, I don’t think that learning about tidyeval is important. I can only speak for me, and explain to you why I personally find tidyeval useful. I wanted to write this blog post after reading this twitter thread and spe...

2982 sym R (302 sym/3 pcs)

Why I find tidyeval useful

26.08.2017

First thing’s first: maybe you shouldn’t care about tidyeval. Maybe you don’t need it. If you exclusively work interactively, I don’t think that learning about tidyeval is important. I can only speak for me, and explain to you why I personally find tidyeval useful. I wanted to write this blog post after reading this twitter thread and spe...

2977 sym R (302 sym/3 pcs)

Why I find tidyeval useful

26.08.2017

First thing’s first: maybe you shouldn’t care about tidyeval. Maybe you don’t need it. If you exclusively work interactively, I don’t think that learning about tidyeval is important. I can only speak for me, and explain to you why I personally find tidyeval useful. I wanted to write this blog post after reading this twitter th...

893 sym

Easy peasy STATA-like marginal effects with R

25.10.2017

Model interpretation is essential in the social sciences. If one wants to know the effect of variable x on the dependent variable y, marginal effects are an easy way to get the answer. STATA includes a margins command that has been ported to R by Thomas J. Leeper of the London School of Economics and Political Science. You can find the source cod...

2887 sym R (3256 sym/11 pcs) 4 img

Functional peace of mind

13.11.2017

I think what I enjoy the most about functional programming is the peace of mind that comes with it. With functional programming, there’s a lot of stuff you don’t need to think about. You can write functions that are general enough so that they solve a variety of problems. For example, imagine for a second that R does not have the sum() functi...

2895 sym R (3436 sym/5 pcs)

Teaching the tidyverse to beginners

16.12.2017

End October I tweeted this: will teach #rstats soon again but this time following @drob 's suggestion of the tidyverse first as laid out here: https://t.co/js8SsUs8Nv— Bruno Rodrigues (@brodriguesco) October 24, 2017 and it generated some discussion. Some people believe that this is the right approach, and some others think that one should firs...

5414 sym R (600 sym/1 pcs) 2 img

Building formulae

26.12.2017

This Stackoverflow question made me think about how to build formulae. For example, you might want to programmatically build linear model formulae and then map these models on data. For example, suppose the following (output suppressed): data(mtcars) lm(mpg ~ hp, data = mtcars) lm(mpg ~I(hp^2), data = mtcars) lm(mpg ~I(hp^3), data = mtcars) lm(m...

1381 sym R (2074 sym/5 pcs)

It’s lists all the way down

02.01.2018

Today, I had the opportunity to help someone over at the R for Data Science Slack group (read more about this group here) and I thought that the question asked could make for an interesting blog post, so here it is! Disclaimer: the way I’m doing things here is totally not optimal, but I want to illustrate how to map functions over nested lists....

4747 sym R (16106 sym/10 pcs)

It’s lists all the way down, part 2: We need to go deeper

04.01.2018

Shortly after my previous blog post, I saw this tweet on my timeline: The purrr resolution for 2018 – learn at least one purrr function per week – is officially launched with encouragement and inspiration from @statwonk and @hadleywickham. We start with modify_depth: https://t.co/dCMnSHP7Pl. Please join to learn and share. #rstats— Isabe...

5972 sym R (13920 sym/9 pcs) 2 img

Mapping a list of functions to a list of datasets with a list of columns as arguments

18.01.2018

This week I had the opportunity to teach R at my workplace, again. This course was the “advanced R” course, and unlike the one I taught at the end of last year, I had one more day (so 3 days in total) where I could show my colleagues the joys of the tidyverse and R. To finish the section on programming with R, which was the very last section ...

2941 sym R (1631 sym/7 pcs)