# NOT RUN {
data(columbus, package="spData")
fit.lm <- lm(CRIME ~ INC, data=columbus)
summary(fit.lm)
gwer.bw <- gwer.sel(CRIME ~ INC, data=columbus, family = Normal(),
coords=cbind(columbus$X, columbus$Y))
fit.gwer <- gwer(CRIME ~ INC, family = Normal(), bandwidth = gwer.bw, hatmatrix = TRUE,
spdisp = TRUE, parplot = TRUE, data=columbus, method = "gwer.fit",
coords=cbind(columbus$X, columbus$Y))
summary(fit.gwer)
# }
# NOT RUN {
data(columbus, package="spData")
fit.elliptical <- elliptical(CRIME ~ INC, family = Student(df=4), data=columbus)
summary(fit.elliptical)
gwer.bw <- gwer.sel(CRIME ~ INC, data=columbus, family = Student(df=4),
coords=cbind(columbus$X, columbus$Y), method = 'aic')
gwer.fitt <- gwer(CRIME ~ INC, family = Student(df=4), bandwidth = gwer.bw, hatmatrix = TRUE,
spdisp = TRUE, parplot = TRUE, data=columbus, method = "gwer.fit",
coords=cbind(columbus$X, columbus$Y))
summary(gwer.fitt)
# }
Run the code above in your browser using DataLab