search for: menhshape2

Displaying 1 result from an estimated 1 matches for "menhshape2".

Did you mean: menhshape
2018 Jan 27
0
GAM: mismatch between nb/polys supplied area names and data area names
...) #NB: the new area ids are: "01", "02",..."50" #read in the shapefile and create the neighborhood object nb, #names(nb) must correspond to the levels of the covariate of the smooth (i.e. the area labels) shape<-readOGR(dsn="~/Long/MENHShape",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=...