# NOT RUN {
walter <- spduration::add_duration(Walter_2015_JCR,"renewed_war",
unitID = "ccode", tID = "year",
freq = "year", ongoing = FALSE)
walter <- spatial_SA(data = walter, var_ccode = "ccode", threshold = 800L)
set.seed(123456)
model <-
spatialSPsurv(
duration = duration ~ fhcompor1 + lgdpl + comprehensive + victory +
instabl + intensityln + ethfrac + unpko,
immune = cured ~ fhcompor1 + lgdpl + victory,
Y0 = 't.0',
LY = 'lastyear',
S = 'sp_id' ,
data = walter[[1]],
N = 100,
burn = 10,
thin = 10,
w = c(1,1,1),
m = 10,
form = "Weibull",
prop.varV = 1e-05,
prop.varW = 1e-05,
A = walter[[2]]
)
print(model)
summary(model, parameter = "betas")
# plot(model)
# }
Run the code above in your browser using DataLab