bsps_map: bsps_map

Description Usage Arguments Examples

View source: R/bsps_map.R

Description

Implement the mapCountryData function in a short and fast version.

Usage

1
bsps_map(data, mapTitle = "columnName")

Arguments

data

data.

mapTitle

title to add to the map, any string or 'columnName' to set it to the name of the data column.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
library(BayesSPsurv)

walter <- spduration::add_duration(Walter_2015_JCR,"renewed_war",
                                   unitID = "id", tID = "year",
                                   freq = "year", ongoing = FALSE)

walter <- BayesSPsurv::spatial_SA(data = walter, var_ccode = "ccode", threshold = 800L)

set.seed(123456)

model <- spatialSPsurv(
   duration  = duration ~ victory + comprehensive + lgdpl + unpko,
   immune    = atrisk ~ lgdpl,
   Y0        = 't.0',
   LY        = 'lastyear',
   S         = 'sp_id' ,
   data      = walter[[1]],
   N         = 1500,
   burn      = 300,
   thin      = 15,
   w         = c(1,1,1),
   m         = 10,
   form      = "Weibull",
   prop.varV = 1e-05,
   prop.varW = 1e-03,
   A         = walter[[2]]
)

bsps_map(data = model$W)

BayesSPsurv documentation built on Sept. 13, 2021, 9:09 a.m.