Formulae Auto-Derivation for Nested Logit Models

This file uses the Symbolic Python (SymPy) package to derive the elasticity formulae for Nested Logit Models. SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily …

more ...

Learning Resources for Econometrics, Statistics and Machine Learning

Over the years, I have used a number of books for Econometrics, statistics and machine learning either as a student, teaching assistant or lecturer. Even though I enjoy reading hard copies more, I am more and more inclined to have electronic copies when overall costs of carry are considered. Given …

more ...

Calculating t-statistic for OLS Regression in Python

In a previous article, we calculated the OLS estimate and its variance using only the Numpy package in Python. In most cases, we would also need the t-statistic and its p-value to see if the coefficients we got are statistically significant. To achieve this, we will use SciPy, a powerful …

more ...

Ordinary Least Squares Regression in Python from Scratch

This article introduces how to calculate the coefficients for an Ordinary Least Squares regression in Python using only the NumPy package. NumPy is the fundamental package for scientific computing with Python. It performs in some way similar to R. First, let us import the NumPy package.

# Import NumPy
import numpy …
more ...