# poissonff example
fit0 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
fam = poissonff)
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit0)
# negbinomial example
fit1 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
fam = negbinomial)
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit1)
# normal1 example
fit2 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
fam = normal1)
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit2)
# medpolish example
fit3 <- rcam(Rcam(moffset(alcoff), rbaseline = "11", cbaseline = "Monday"),
fam = alaplace2(tau = 0.5, intparloc = TRUE))
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit3)
# zipoissonff example
fit4 <- rcam(Rcam(moffset(crashp), rbaseline = "11", cbaseline = "Monday"),
fam = zipoissonff, Rank = 0, trace = TRUE, crit = "l")
par(oma = c(0,0,4,0), mfrow = c(1, 2))
plotrcam0(fit4)
Run the code above in your browser using DataLab