Hi,

I have a panel data (300 panels and 30 years) and need to estimate a GMM (difference or system GMM)
I also need to incorporate spatially autocorrelated errors in the model i.e. i need to estimate a SAR model through GMM


I have read earlier posts on the same topic (https://www.statalist.org/forums/for...el-through-gmm)

I know that the command "spivreg" can be used but it is for cross section while i have a panel data
I also explored "spregdpd" by Emad Sehata but it give me an error "matsize too small"


Is there is a command that I can use to estimate SAR model with the GMM?

Thanks.