Hi all,
I would be grateful if you could help me on the following, which i believe is easy, but I can not resolve it:
I run the following code in an effort to run a spatial model with a weight matrix, for which I use the inverse-squared distance matrix as follows:
spmat idistance dobj _CX _CY, id(provid)
spmat getmatrix dobj W id
mata: W = W:^2
spmat putmatrix dobj W id, replace
Then I run spregress y x1 x2 x3 x4 i.preid, gs2sls heteroskedastic errorlag(W) ivarlag(W:x5) force
and I get this error message
weighting matrix W not found
r(111);
Look forward to your guidance. Thank you very much in advance for your help.
Nikos Benos
I would be grateful if you could help me on the following, which i believe is easy, but I can not resolve it:
I run the following code in an effort to run a spatial model with a weight matrix, for which I use the inverse-squared distance matrix as follows:
spmat idistance dobj _CX _CY, id(provid)
spmat getmatrix dobj W id
mata: W = W:^2
spmat putmatrix dobj W id, replace
Then I run spregress y x1 x2 x3 x4 i.preid, gs2sls heteroskedastic errorlag(W) ivarlag(W:x5) force
and I get this error message
weighting matrix W not found
r(111);
Look forward to your guidance. Thank you very much in advance for your help.
Nikos Benos