“”
Back

Presentation

blockops: A new Mata library for efficient operations on block matrices

Daniel Schneider

Friday 12th September

Session

This presentation introduces a new Mata library called "blockops". Its main feature is a class that divides a matrix into multiple submatrices. Operations on the original matrix are then carried out in terms of the submatrices. The library mainly serves two purposes: First, it provides a simple approach of dealing with special kinds of sparse matrices. Submatrices that consist entirely of zeroes are represented by a null pointer and do not partake in arithmetic operations. For suitable applications, this can lead to vast increases in speed with regards to matrix multiplication and matrix inversion. The second purpose is the application of a built-in or user-defined function to each submatrix, similar to, for example, R's *apply() functions. This can ease code generation and improve readability while maintaining Mata's favorable speed properties. Several examples are shown to demonstrate the usefulness of the new library for statistical calculations.

Speaker

Daniel Schneider