Resources

Some functions written in R that I'm sharing ...

be.zeroinfl.filt.full.adj1

This R script, developed for the paper "A Spatial-Filtering Zero-Inflated Approach to the Estimation of the Gravity Model of Trade" (Econometrics, 2018, https://www.mdpi.com/2225-1146/6/1/9), performs a backward stepwise selection for spatial filters in zero inflated gravity models for trade, that is based on robust (sandwich) p-values and does not require likelihood-based indicators. The developed function is called be.zeroinfl.filt.full.adj1, because it is a development of the fuction be.zeroinfl in pscl

 VARXpredarzero

Function VARX in MTS package (R) allows the estimation of a Vector AutoRegressive with eXogenous covariates (VARX) model. Function VARXpred allows to predict out-of-sample values according to the model estimated with VARX. However, functionVARXpred does not work when the AR order of the VARX model is 0. One can be interested in estimating a VARX model with no AR lag terms. One may find that AIC does not decrease by including AR lag terms, or one may be interested in manually including different lag terms (e.g. when the time series present a complex seasonality). I developed a modified version of VARXpred (called VARXpredarzero) that allows to make prediction even if AR order is zero.

 WDistCutOff

This R script, called WDistCutOff, takes as input a square distance weight matrix and it replaces the values of the matrix to zero if the distance is below a certain (specified by the user) cut-off, with the constraint that at least a specified number (by the user) of values by row and by column must be different from zero

Videos and tutorials

Motion Charts for spatio-temporal movements in team sports

Tutorial showing how to visualize spatio-temporal movements of basketball players within the court using gvisMotionChart function in googleVis, R Package. Material associated to the publication: 

Metulini, R. (2017), Spatio-Temporal Movements in Team Sports: A Visualization approach using Motion Charts. Electronic Journal of Applied Statistical Analysis. Vol 10, No 3. doi: 10.1285/i20705948v10n3p809

Miscellaneous

Lesson 31/05/24 LM Ingegneria Informatica