Steve Friedman <friedman.steve <at> gmail.com> writes: > > Hi everyone, > > I'm working with a modest sized spatial database consisting of 1513 records > and 50 variables. Fourteen of these are dummy variables delineating > regional planning councils. I'm trying to understand how to integrate the > dummy variables in the geographically weight regression model. I'm reading > Fotheringham et.al. and see reference to using dummy variables, but I don't > see an example ilustrating the procedure. I also don't see an example in > the spgwr.pdf files associated with the package. > > If anyone has experience with this I'd certainly like to hear from you.
As you may know, so-called GWR models are severely subject to collinearity impacting local coefficients. In R, dummy variables are operationalised as factors, split out into the appropriate dummies within model functions from the formula argument. So just put the categorical variable (factor) in the RHS of the formula, and it will just happen. So gwr(y ~ regional_planning_councils + ..., ...) for gwr in the spgwr package will just work for factor regional_planning_councils with 14 levels. The R-sig-geo list is more focused on this kind of question. Roger > > I'm using R-2.5.1 on a PC. > > Thanks in advance. > > Steve > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help <at> r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.