[R-sig-Geo] Error when running a Spatial Durbin Error Model without intercept
Roger Bivand
Roger@B|v@nd @end|ng |rom nhh@no
Sat Aug 10 14:05:45 CEST 2019
On Fri, 9 Aug 2019, Rolando Valdez wrote:
> Dear list,
>
> I am trying to run a Spatial Durbin Error Model without intercept, however,
> I do get an error:
>
> In spatialreg::errorsarlm(formula = formula, data = data, listw = listw, :
> model configuration issue: no total impacts
I can reproduce the problem, with error messages:
> sdem <- errorsarlm(eq, data = COL.OLD, listw = W, etype = "emixed",
+ method = "eigen")
Error in estimable.default(lm.target, cm) :
`cm' argument must be of type vector, list, or matrix.
In addition: Warning messages:
1: Function errorsarlm moved to the spatialreg package
2: In spatialreg::errorsarlm(formula = formula, data = data, listw =
listw, :
model configuration issue: no total impacts
> traceback()
6: stop("`cm' argument must be of type vector, list, or matrix.")
5: estimable.default(lm.target, cm)
4: estimable(lm.target, cm)
3: as.matrix(estimable(lm.target, cm)[, 1:2, drop = FALSE])
2: spatialreg::errorsarlm(formula = formula, data = data, listw = listw,
na.action = na.action, Durbin = Durbin, etype = etype, method =
method,
quiet = quiet, zero.policy = zero.policy, interval = interval,
tol.solve = tol.solve, trs = trs, control = control)
1: errorsarlm(eq, data = COL.OLD, listw = W, etype = "emixed", method =
"eigen")
I think that the construction of the specification matrix for
gmodels::estimable() is faulty; will explore whether no-intercept is
supportable.
Roger
>
> This is what I am doing:
>
> library(spatialreg)
> library(spdep)
> data(oldcol, package = "spdep")
> W <- spdep::nb2listw(COL.nb, style = "W")
> eq <- CRIME ~ 0 + INC + HOVAL
> sdem <- errorsarlm(eq, data = COL.OLD, listw = W, etype = "emixed",
> method = "eigen")
>
> Thanks for any advice.
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the R-sig-Geo
mailing list