Hi,
In Lasage's Introduction to Spatial Econometrics, he describe the process of creating doubly-stochastic weight matrices that have rows and columns that sum to 1 and exhibit symmetry as follows:
Transforming a matrix Wt to doubly stochastic form involves an iterative process: 1) calculating the diagonal matrix of row sums Rt for the symmetric weight matrix Wt, 2) calculating Wt+1 = Rt-1/2 WtRt-1/2, and, 3) repeating steps 1) and 2) until convergence (p.88).
I am hoping someone with experience coding in Mata might be able to help translate these instructions into a series of Mata commands for a Mata neophyte.
Best wishes,
alvin
In Lasage's Introduction to Spatial Econometrics, he describe the process of creating doubly-stochastic weight matrices that have rows and columns that sum to 1 and exhibit symmetry as follows:
Transforming a matrix Wt to doubly stochastic form involves an iterative process: 1) calculating the diagonal matrix of row sums Rt for the symmetric weight matrix Wt, 2) calculating Wt+1 = Rt-1/2 WtRt-1/2, and, 3) repeating steps 1) and 2) until convergence (p.88).
I am hoping someone with experience coding in Mata might be able to help translate these instructions into a series of Mata commands for a Mata neophyte.
Best wishes,
alvin