# NOT RUN {
## Example 1: spatial SI model
# generate 100 individuals
# }
# NOT RUN {
x <- runif(100, 0, 10)
y <- runif(100, 0, 10)
covariate <- runif(100, 0, 2)
out <- epidata(type = "SI", n = 100, Sformula = ~covariate, tmax = 15,
alpha = c(0.1, 0.3), beta = 5.0, x = x, y = y)
mcout <- epimcmc(type = "SI", x = x, y = y, inftime = out$inftime, Sformula = ~covariate,
tmax = 15, niter = 1000, alphaini = c(0.01, 0.01), betaini = 0.01,
pro.var.a = c(0.01, 0.005), pro.var.b = 0.05,
prioralpha = "halfnormal", halfnorm.var.a = c(10**5, 10**5),
priorbeta = "halfnormal", halfnorm.var.b = 10**5)
# }
Run the code above in your browser using DataLab