Dear Aj, and Boonyarat,
When I run R code, I found problen in exceedance probability part:
> #####################################################
> # Exceedance probability
> #####################################################
> exc1 <- sapply(mod.eco.reg$marginals.fitted.values,FUN = function(marg){1 – inla.pmarginal(q = 1, marginal = marg)})
> summary(exc1)
Length Class Mode
0 list list
> exc1.cutoff <- c(0, 0.8, 0.9, 0.95, 1)
> cat.exc1<- cut(unlist(exc1),breaks=exc1.cutoff,include.lowest=TRUE)
Error in cut.default(unlist(exc1), breaks = exc1.cutoff, include.lowest = TRUE) :
‘x’ must be numeric
> maps.cat.exc1 <- data.frame(ID=data.suicides$ID, cat.exc1=cat.exc1)
Error in data.frame(ID = data.suicides$ID, cat.exc1 = cat.exc1) :
object ‘cat.exc1’ not found
> data.boroughs <- attr(london.gen, “data”)
> attr(london.gen, “data”) <- merge(data.boroughs, maps.cat.exc1, by=”ID”)
Error in h(simpleError(msg, call)) :
error in evaluating the argument ‘y’ in selecting a method for function ‘merge’: object ‘maps.cat.exc1’ not found
> #spplot(obj=london.gen, zcol= “cat.exc1″, main=list(label=”Exceedance”,cex=1), col.regions=gray(seq(0.9,0.1,length=4)))
Then I run continue but in last lain after combine plots: it show “Error in [.data.frame
(obj@data, zcol) : undefined columns selected”
So, It isn’t showed plots. How to solve this problem?