Skip to content
Prev 25585 / 29559 Next

variance-covariance matrix for GMerrorsar

On Tue, 11 Apr 2017, Qiuhua Ma wrote:

            
The DGP for this model is (I - \rho W)^{-1} (X \beta + e), so I'm in geat 
doubt about whether your proposal is correct (model1.vcov is has one more 
row and column than X has columns, so including \rho); the first element 
of model1.beta is \rho.
Reading the code, you'll see where the matrices occur. Running under 
debug, you can assign the outside the environment of the function if you 
like (use <<- ). I've added a vcov component in the returned object 
(source on R-Forge, I can send a source package or a Windows binary 
package).

You should also look at sphet::spreg, which does return a var component. 
Please note that you should think of the DGP first and foremost, the coef 
and var may return the values for what you are treating as nuisance parts 
of the model. Getting the distribution of the willingess to pay also 
probably involves them and their variability.

Have you considered getting the WTP marginal from a Bayesian approach?

Hope this helps,

Roger