Gutschlhofer / carbon_emissions_EU

Spatial economics seminar paper based on Videras (2014) exploring spatial patterns of carbon emissions in the EU
MIT License
1 stars 0 forks source link

Get infos on spgwr R package #5

Closed Gutschlhofer closed 3 years ago

Gutschlhofer commented 3 years ago

There are two functions, gwr.sel, that determines the bandwidth, and gwr that runs the model based on the given bandwidth. The bandwidth used in Videras (2014) is called gwr.bisquare here.

bwG <- gwr.sel(model, data = data, gweight = gwr.bisquare, verbose = FALSE)
gwrG <- gwr(model, data = data, bandwidth = bwG,  gweight = gwr.bisquare, hatmatrix = TRUE)

> gwr.bisquare
function (dist2, d) 
{
    d2 <- d^2
    w <- ifelse(dist2 > d2, 0, (1 - (dist2/d2))^2)
    w
}
Gutschlhofer commented 3 years ago

There is another package: GWmodel