Dear community,

I've prepared two new commands to solve non-traditional types of linear programming via least squares (minimum norm general solution).
Many thanks to Kit Baum for uploading their latest versions to the SSC!

lppinv – a module to solve an under-, over- and identified linear problem without an objective function with the Moore-Penrose pseudoinverse and singular value decomposition (SVD).

The algorithm solves "hybrid" least squares linear programming (LS-LP) problems with the help of the Moore-Penrose inverse (pseudoinverse), calculated using singular value decomposition (SVD), with emphasis on estimation of non-typical constrained OLS (cOLS), Transaction Matrix (TM), and custom (user-defined) cases. Eventual regression analysis and a Monte-Carlo-based t-test of mean NRMSE is performed, the sample being drawn from a uniform or a user-specified distribution (Mata function).

tmpinv – a module to solve an under-, over- and identified Transaction Matrix (TM) problem with the help of the Moore-Penrose pseudoinverse, singular value decomposition (SVD), an F-test from linear regression/t-test of mean normalized RMSE, and results adjustment for extreme values.

The algorithm solves "hybrid" linear programming-least squares (LP-LS) Transaction Matrix (TM) problems with the help of the Moore-Penrose inverse (pseudoinverse), calculated using singular value decomposition (SVD). Estimation using 2x2 to 50x50 contiguous submatrices, repeated with compensatory slack variables until NRMSE is minimized in a given number of iterations, is followed by an F-test from linear regression/t-test of mean NRMSE from a pre-simulated distribution (Monte-Carlo, 50,000 iterations with matrices consisting of normal random variates). The result is adjusted for extreme values to match the RHS via shares of estimated row/column sums if the corresponding option is specified.

They can help solve a variety of interesting problems like calculating input-output tables, transaction matrices (like bilateral trade and investment tables), supply-use relations, a GDP (depvar) model with regards to a business cycle definition, etc.

If you are interested, you can find more information and examples in their help files.
I'm working on papers on the topic.

Have a nice day,
IB