I am running a qap command (from SSC), using one half (upper triangle) of a square matrix with the structure N*N*T. N= 2,832 and T=10, hence I have ~40 million observations. I am using Stata/IC 14.2.

The command is working as long as the syntax looks like this:

Code:
qap _qap rowvar colvar dependent_variable, cmd(reg dependent_variable explanatory_variable) stats(_b[explanatory_variable]) timevar(Year) count
As soon as I add more than one explanatory variable (controls) to the cmd(reg dependent_variable explanatory_variable) portion of the command, I get an "invalid syntax" error.

Any help on how to use qap with a more complex estimation program (cmd) would be greatly appreciated! Thank you