Skip to main content
Notice removed Draw attention by Saïd Maanan
Bounty Ended with Jeffrey Evans's answer chosen by Saïd Maanan
Notice added Draw attention by Saïd Maanan
Bounty Started worth 50 reputation by Saïd Maanan
added 1 character in body
Source Link

I was able to deal with location variablevariables being polygons not points:

I was able to deal with location variable being polygons not points:

I was able to deal with location variables being polygons not points:

added 1818 characters in body
Source Link

I was able to deal with location variable being polygons not points:

> head(map_3)
Simple feature collection with 6 features and 4 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: -9.890198 ymin: 30.34965 xmax: -3.802499 ymax: 35.26228
Geodetic CRS:  WGS 84
                  PROV         y      x.x      x.y                       geometry
1 Agadir-Ida-Ou-Tanane  9.809457 46.26182 5.899067 POLYGON ((-9.504189 30.3498...
2             Al Haouz 25.419273 47.62713 2.061563 POLYGON ((-7.344661 31.6732...
3           Al Hoceïma 16.325224 47.36490 2.993311 POLYGON ((-3.926041 35.2609...
4               Azilal 31.601461 48.64625 2.291929 POLYGON ((-5.908287 32.3059...
5          Béni Mellal 17.411668 48.87454 4.155205 POLYGON ((-6.047234 32.7797...
6           Benslimane 18.095435 47.83364 4.523673 POLYGON ((-7.195987 33.1876...

> spdf <- as(map_3, "Spatial")
> DM <- gw.dist(dp.locat = coordinates(spdf)) 
> bw.f2 <- bw.gwr(y~x.x+x.y,data=spdf, dMat=DM)
> res.binomial<-gwr.basic(y~x.x+x.y, bw=bw.f2,data=spdf, dMat=DM)
> summary(res.binomial)
              Length Class                    Mode
GW.arguments  11     -none-                   list
GW.diagnostic  8     -none-                   list
lm            14     lm                       list
SDF           72     SpatialPolygonsDataFrame S4  
timings        5     -none-                   list
this.call      5     -none-                   call
Ftests         0     -none-                   list

But I still can't find anything online similar to my problem, all the resources I found either use proportions as dependent variables, or assign a Yes/No to a location, but nothing like my problem.

I was able to deal with location variable being polygons not points:

> head(map_3)
Simple feature collection with 6 features and 4 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: -9.890198 ymin: 30.34965 xmax: -3.802499 ymax: 35.26228
Geodetic CRS:  WGS 84
                  PROV         y      x.x      x.y                       geometry
1 Agadir-Ida-Ou-Tanane  9.809457 46.26182 5.899067 POLYGON ((-9.504189 30.3498...
2             Al Haouz 25.419273 47.62713 2.061563 POLYGON ((-7.344661 31.6732...
3           Al Hoceïma 16.325224 47.36490 2.993311 POLYGON ((-3.926041 35.2609...
4               Azilal 31.601461 48.64625 2.291929 POLYGON ((-5.908287 32.3059...
5          Béni Mellal 17.411668 48.87454 4.155205 POLYGON ((-6.047234 32.7797...
6           Benslimane 18.095435 47.83364 4.523673 POLYGON ((-7.195987 33.1876...

> spdf <- as(map_3, "Spatial")
> DM <- gw.dist(dp.locat = coordinates(spdf)) 
> bw.f2 <- bw.gwr(y~x.x+x.y,data=spdf, dMat=DM)
> res.binomial<-gwr.basic(y~x.x+x.y, bw=bw.f2,data=spdf, dMat=DM)
> summary(res.binomial)
              Length Class                    Mode
GW.arguments  11     -none-                   list
GW.diagnostic  8     -none-                   list
lm            14     lm                       list
SDF           72     SpatialPolygonsDataFrame S4  
timings        5     -none-                   list
this.call      5     -none-                   call
Ftests         0     -none-                   list

But I still can't find anything online similar to my problem, all the resources I found either use proportions as dependent variables, or assign a Yes/No to a location, but nothing like my problem.

added 34 characters in body
Source Link

Therefore, how can I run a Geographically Weighted Logistic Regression model on my data? I just gave the GWModel package as an example; doif you know a different package or function that can get the job done?, please feel free to use it.

Therefore, how can I run a Geographically Weighted Logistic Regression on my data? I just gave the GWModel package as an example; do you know a different package or function that can get the job done?

Therefore, how can I run a Geographically Weighted Logistic Regression model on my data? I just gave the GWModel package as an example; if you know a different package or function that can get the job done, please feel free to use it.

title as statement; removed please and TIA; Questionified
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65
Loading
Source Link
Loading