Clarification

15 views
Skip to first unread message

Ebenezer Ogunsakin

unread,
Sep 2, 2024, 9:51:22 PMSep 2
to R-inla discussion group
Dear All

Good day.

I was reading a book titled Spatial and Spatio-temporal Bayesian Models with R-INLA.

In Chapter 7 precisely, I saw this line of code

Georgia.adj <- paste(my.dir,"LBW in Georgia/Georgia.graph",sep="")

Please can someone explain to me how to obtain Georgia.graph for other countries or continent? I think it emanates from Shapefile but not so sure. Any suggestion would help.

Thank you.

Aditya L. Ramadona

unread,
Sep 3, 2024, 12:33:14 AMSep 3
to Ebenezer Ogunsakin, R-inla discussion group
Hi,
There is an explanation on how to obtain the graph for other places in Chapter 6 of the same book.

Best regards,
Aditya

##
###################################################
### Code for Section 6.1.2
###################################################
# You neeed a folder called "London Suicides" inside your working directory (my.dir)
# with the data downloaded from

library(maptools)
library(spdep)

load("dataset/London Suicides/LondonSuicides.RData")
london.gen <- readShapePoly("dataset/London Suicides/LDNSuicides.shp")

temp <- poly2nb(london.gen)
nb2INLA("LDN1.graph", temp)
LDN.adj <- paste(getwd(),"/LDN.graph",sep="")

--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/a8b0f2ad-ed89-4eee-8691-72b7913af221n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages