<p><a href="http://www.stata.com/meeting/germany13/abstracts/materials/de13_mortari.pdf" rel="nofollow noreferrer">Here</a> is a detailed worked example of how to use the <code>xsmle</code> command, including an example of the Spatial Durbin model. As the document says, it is estimated using Maximum Likelihood. The model can be of Random Effects or Fixed Effects. </p>

<p>Key screenshots below:</p>

<p><a href="https://i.sstatic.net/IaitK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IaitK.png" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/tw3bq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tw3bq.png" alt="enter image description here"></a></p>

<p>You need to use <code>model(sdm)</code> in the options to get the spatial Durbin model. To get the dynamic version of the model, add <code>dlag</code> to the options.</p>

CC BY-SA 3.0
2017-07-23T07:41:08.647Z
2017-07-23T07:41:08.647Z
luchonacho
<p>I'm assuming you know how to do spatial weights matrices and such, so I will just skip that and throw out a disclaimer that I use R as my primary statistical programming language, not STATA, so let's first observe a generic spatial model:</p>

<pre><code>spatreg $ylist $xlist, weights(W) eigenvalues(E) model(lag)
</code></pre>

<p>The <code>lag</code> in that function can be replaced with an <code>error</code> option if you want the SEM. To do a spatial durbin model (SDM) in R I find that using <code>mixed</code> or a <code>durbin</code> option does the job. Try and see if that works in place of <code>lag</code> in <code>model()</code>, for future reference. Sometimes the option is there but not many people use it because they don't usually care about estimating the model.</p>

<p>Next, try out the <code>spmlreg</code> function which appears to have the spatial durbin option:</p>

<pre><code>spmlreg $ylist $xlist, weights(W) wfrom(Stata) eigenvar(E) model(durbin)
</code></pre>

<p>For a better understanding of the function, check out P. Wilner Jeanty's <a href="http://fmwww.bc.edu/repec/bocode/s/spmlreg.html" rel="nofollow noreferrer">documentation</a> of <code>spmlreg</code>.</p>

<p>Maybe both of them work fine, and that'd be cool. The more options the better. </p>

CC BY-SA 3.0
2017-06-22T16:10:29.543Z
2017-06-22T16:10:29.543Z
JellisHeRo
<p>Can someone explain to me how the estimation of the spatial Durbin model is made in Stata ? The documentation of XSMLE command (for spatial panels) says that for dynamic cases the estimator are based upon the article of <a href="http://www.sciencedirect.com/science/article/pii/S0304407608000808" rel="nofollow noreferrer">Yu et. al. (2008)</a>. But I have not found references in the article to the estimation process of the Spatial Durbin model.</p>

<econometrics><paneldata>
Spatial Durbin model in Stata - How it is estimated?
Joao Luiz Pacheco
# Spatial Durbin model in Stata - How it is estimated?

(Asked by: username_0 on 2016-04-17)

Can someone explain to me how the estimation of the spatial Durbin model is made in Stata ? The documentation of XSMLE command (for spatial panels) says that for dynamic cases the estimator are based upon the article of [Yu et. al. (2008)](http://www.sciencedirect.com/science/article/pii/S0304407608000808). But I have not found references in the article to the estimation process of the Spatial Durbin model.

**Tags:** econometrics, paneldata


---

## 2 answers

### Answer by username_1 on 2017-07-23. Score: 1 | Accepted answer

[Here](http://www.stata.com/meeting/germany13/abstracts/materials/de13_mortari.pdf) is a detailed worked example of how to use the `xsmle` command, including an example of the Spatial Durbin model. As the document says, it is estimated using Maximum Likelihood. The model can be of Random Effects or Fixed Effects.

Key screenshots below:

[![enter image description here](https://i.sstatic.net/IaitK.png)](https://i.sstatic.net/IaitK.png)

[![enter image description here](https://i.sstatic.net/tw3bq.png)](https://i.sstatic.net/tw3bq.png)

You need to use `model(sdm)` in the options to get the spatial Durbin model. To get the dynamic version of the model, add `dlag` to the options.


---

### Answer by username_2 on 2017-06-22. Score: 1

I'm assuming you know how to do spatial weights matrices and such, so I will just skip that and throw out a disclaimer that I use R as my primary statistical programming language, not STATA, so let's first observe a generic spatial model:
spatreg $ylist $xlist, weights(W) eigenvalues(E) model(lag)

The lag in that function can be replaced with an error option if you want the SEM. To do a spatial durbin model (SDM) in R I find that using mixed or a durbin option does the job. Try and see if that works in place of lag in model(), for future reference. Sometimes the option is there but not many people use it because they don't usually care about estimating the model.
Next, try out the spmlreg function which appears to have the spatial durbin option:
spmlreg $ylist $xlist, weights(W) wfrom(Stata) eigenvar(E) model(durbin)

For a better understanding of the function, check out P. Wilner Jeanty's documentation of spmlreg.
Maybe both of them work fine, and that'd be cool. The more options the better.


---

