Hi all,

I'm looking to do some gravity modelling with a large number of rhs variables and interactions. Looking at the variety of model selection commands available in Stata, there are a number of variable selection commands, such as GSREG which can be used with commands like glm to run a ppml gravity model. Ideally however I'd like to use the latest Stata command for gravity, PPMLHDFE (given the computational efficiency of how it handles the fixed effects), with Stata 16's new lasso commands for causal inference. Is there any way these two commands can be combined?

One idea I tried was using the HDFE subcommand to demean the trade flows variable by the fixed effect dimensions, after which I planned to just use the new lasso for inference commands (using the poisson option) on the newly demeaned variable. However, I found the problem that the trade flow variable now includes negative values (by construction of the demeaning) and so couldn't run a ppml regression on it. Are there additional commands that I need to use on the variable before I'd be able to run a poisson regression on them?

If this isn't viable, is there an alternative approach?

Thank you in advance,
Elliot