Iterative solutions for structural gravity models in panels