Dear list,
I am working on my bachelor thesis in economic geography. For that reason,
Im relatively new to spatial statistics. I hope I can clearly point out,
where my problem seems to be.
I try to examine whether public funding has a significant impact on
regional patenting activity or not. In this context, Im using a cross
sectional data set out of 150 German labor market regions, which contains
patent counts, values of the public subsidies and some other control
variables for each of the regions. Since the values of the dependent
variable are counts and there exists over-dispersion, I first used glm.nb
{pscl} to run a negative binomial regression.
To generate more robust results, I want to consider the spatial effects
within the data. As far as I know, doesn't exist any appropriate way to
test for spatial autocorrelation (SAC) in generalized linear models,
regarding the following post:
<
http://r-sig-geo.2731867.n2.nabble.com/how-to-find-observed-Moran-s-I-value-using-moran-test-spdep-td5203212.html>
But to check whether there is little evidence of SAC, I used lm.morantest
{spdep} with a simple inverse distance calculation:
> spamr<-readOGR(
) #reading in the *.shp file to calculate the inverse
distance matrix.
> coords <- coordinates(spamr)
> spamr_knn<-knn2nb(knearneigh(coords))
> all.linked<-max(unlist(nbdists(spamr_knn,coords)))
> spamr_dn<-dnearneigh(coords,0,all.linked)
> idlist<-nbdists(spamr_dn,coords)
> idlist<-lapply(idlist,function(x) 1/x)
> idlistw<-nb2listw(spamr_dn,glist=idlist)
> nb_mach<-glm.nb(pat_mach~bmbf_mach+publ_mach+rand_mach+den+wo)
> lm.morantest(nb_mach,idlistw)
To see the results:
Global Moran's I for regression residuals
data:
model: glm.nb(formula = pat_mach ~ bmbf_mach + publ_mach + rand_mach +
den + wo, init.theta = 2.338390767, link = log)
weights: idlistw
Moran I statistic standard deviate = 2.6353, p-value = 0.004203
alternative hypothesis: greater
sample estimates:
Observed Moran's I Expectation Variance
0.138220997 -0.008031996 0.003079876
To implement a spatial regression for generalized linear models, I read the
article of Dorman et al. (2007) and found the spatial eigenvector mapping
very interesting. For that reason I want to use the ME ( ) function {spdep}
to account for the spatial effects. But ME ( ) does not fit for negative
binomial regression and the option family=binomial only can use values of
the dependent variable between 0 and 1.
I also took notice of the following post (
http://r-sig-geo.2731867.n2.nabble.com/ME-function-for-negative-binomial-td7278253.html)
but I really dont understand it.
So after a long discussion, my questions to the list are:
(1) Does there exist an appropriate way to consider SAC in negative
binomial models within the ME () function?
(2) Is there another, maybe more appropriate method to consider SAC in
negative binomial models?
Any help is very appreciated. Thank you very much!
Cheers,
Lars.
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo