Displaying 1 result from an estimated 1 matches for "deermi2".
2018 Jan 27
0
GAM: mismatch between nb/polys supplied area names and data area names
...ENHShape",layer=("MENHShape2"))
nb <- poly2nb(shape, queen = TRUE, snap=100, row.names=datawide$id)
names(nb) <- attr(nb, "region.id")
#run GAM spatial neighbors plus covariates
gamspcov <- gam(y2008_2014rate~s(id, bs="mrf", xt = list(nb = nb), k=20) +
s(deermi2) + s(t14), family=nb( ), data=datawide, method="MLE")
#ERROR MESSSAGE
#Error in smooth.construct.mrf.smooth.spec(object, dk$data, dk$knots) :
# mismatch between nb/polys supplied area names and data area names
#In addition: Warning message:
# In if (all.equal(sort(a.name), sort(levels(...