Tag Archives: insightr

Treating your data: The old school vs tidyverse modern tools

By Gabriel Vasconcelos When I first started using R there was no such thing as the tidyverse. Although some of the tidyverse packages were available independently, I learned to treat my data mostly using brute force combining pieces of information … Continue reading

Posted in R | Tagged , , , , , | 14 Comments

The package hdm for double selection inference with a simple example

By Gabriel Vasconcelos In a late post I discussed the Double Selection (DS), a procedure for inference after selecting controls. I showed an example of the consequences of ignoring the variable selection step discussed in an article by Belloni, Chernozhukov … Continue reading

Posted in R | Tagged , , , , , | 3 Comments

Counterfactual estimation on nonstationary data, be careful!!!

By Gabriel Vasconcelos In a recent paper, which can be downloaded here, Carvalho, Masini and Medeiros show that estimating counterfactuals in a non-stationary framework (when I say non-stationary it means integrated) is a tricky task. It is intuitive that the … Continue reading

Posted in R | Tagged , , , , , | 3 Comments

Dealing with S3 methods in R with a simple example

By Gabriel Vasconcelos S3 objects R has three object systems: S3, S4 and RC. S3 is by far the easiest to work with and it can make you codes much understandable and organized, especially if you are working on a … Continue reading

Posted in R | Tagged , , , , | 5 Comments

Cross-Fitting Double Machine Learning estimator

By Gabriel Vasconcelos Motivation In a late post I talked about inference after model selection showing that a simple double selection procedure is enough to solve the problem. In this post I’m going to talk about a generalization of the … Continue reading

Posted in R | Tagged , , , , , | 3 Comments

Online portfolio allocation with a very simple algorithm

By Yuri Resende   Today we will use an online convex optimization technique to build a very simple algorithm for portfolio allocation. Of course this is just an illustrative post and we are going to make some simplifying assumptions. The … Continue reading

Posted in R | Tagged , , , , | 6 Comments

When the LASSO fails???

By Gabriel Vasconcelos When the LASSO fails? The LASSO has two important uses, the first is forecasting and the second is variable selection. We are going to talk about the second. The variable selection objective is to recover the correct … Continue reading

Posted in R | Tagged , , , , , | 21 Comments