Uncertainty is the biggest enemy of a profitable business. That is especially true of small business who don’t have enough resources to survive an unexpected diminution of revenue or to capitalize on a sudden increase of the demand. In this context, it is especially important to be able to predict accurately the change in the […]

# statistics

## Neural networks Exercises (Part-2)

Neural network have become a corner stone of machine learning in the last decade. Created in the late 1940s with the intention to create computer programs who mimics the way neurons process information, those kinds of algorithm have long been believe to be only an academic curiosity, deprived of practical use since they require a […]

## LASSO regression in R exercises

Least Absolute Shrinkage and Selection Operator (LASSO) performs regularization and variable selection on a given model. Depending on the size of the penalty term, LASSO shrinks less relevant predictors to (possibly) zero. Thus, it enables us to consider a more parsimonious model. In this exercise set we will use the glmnet package (package description: here) […]

## Density-Based Clustering Exercises

Density-based clustering is a technique that allows to partition data into groups with similar characteristics (clusters) but does not require specifying the number of those groups in advance. In density-based clustering, clusters are defined as dense regions of data points separated by low-density regions. Density is measured by the number of data points within some […]

## Neural networks Exercises (Part-1)

Neural network have become a corner stone of machine learning in the last decade. Created in the late 1940s with the intention to create computer programs who mimics the way neurons process information, those kinds of algorithm have long been believe to be only an academic curiosity, deprived of practical use since they require a […]

## Quantile Regression in R exercises

The standard OLS (Ordinary Least Squares) model explains the relationship between independent variables and the conditional mean of the dependent variable. In contrast, quantile regression models this relationship for different quantiles of the dependent variable. In this exercise set we will use the quantreg package (package description: here) to implement quantile regression in R. Answers […]

## Quantile Regression in R solutions

Below are the solutions to these exercises on Quantile regression. ############### # # # Exercise 1 # # # ############### library(quantreg) ## ## data(barro) summary(barro) ## y.net lgdp2 mse2 fse2 ## Min. :-0.056124 Min. :5.820 Min. :0.0240 Min. :0.0000 ## 1st Qu.: 0.003529 1st Qu.:6.989 1st Qu.:0.3180 1st Qu.:0.1350 ## Median : 0.019648 Median :7.745 […]

## Evaluate your model with R Exercises

There was a time where statistician had to manually crunch number when they wanted to fit their data to a model. Since this process was so long, those statisticians usually did a lot of preliminary work researching other model who worked in the past or looking for studies in other scientific field like psychology or […]

## Instrumental Variables in R exercises (Part-3)

This is the third part of the series on Instrumental Variables. For other parts of the series follow the tag instrumental variables. In this exercise set we will use Generalized Method of Moments (GMM) estimation technique using the examples from part-1 and part-2. Recall that GMM estimation relies on the relevant moment conditions. For OLS […]

## Instrumental Variables in R exercises (Part-2)

This is the second part of the series on Instrumental Variables. For other parts of the series follow the tag instrumental variables. In this exercise set we will build on the example from part-1. We will now consider an over-identified case i.e. we have multiple IVs for an endogenous variable. We will also look at […]