[R-sig-Geo] Error in predict.sarlm: non-unique row.names given

Jiawen Ng |ove|y||tt|ed@|@|e@ @end|ng |rom gm@||@com
Mon Jul 8 02:02:06 CEST 2019


Another question on predict.sarlm!

Here is the line of code that is producing the error:
pred <- spatialreg::predict.sarlm(model, df, test.listw,zero.policy = T)

Here is the error:

Error in mat2listw(W, row.names = region.id.mixed, style = style) :
  non-unique row.names given
In addition: Warning messages:
1: In spatialreg::predict.sarlm(model, df, test.listw,  :
  some region.id are both in data and newdata
2: In subset(attr(listw.mixed, "region.id"), attr(listw.mixed, "region.id")
%in%  :
  longer object length is not a multiple of shorter object length

Any idea how I can solve the non-unique row.names error?

Thank you!

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list