# calculate percentiles across time
th.pn <- pn(sims = th.mcmc)
##
##Add text
##
# empty plot
plot(NULL, type = "n", xlim = c(1, 945), ylim = range(th.pn), ylab = "Theta")
# add fan
fan(th.pn, txt = NULL)
# add text
fan.txt(th.pn, pn.l = c(1, 10, 50, 90, 99))
fan.txt(th.pn, pn.r = c(1, seq(10, 90, 20), 99))
##
##Change text position, size and colour
##
# empty plot
plot(NULL, type = "n", xlim = c(1, 945), ylim = range(th.pn), ylab = "Theta")
# add fan
fan(th.pn, txt = NULL)
# add text
fan.txt(th.pn, pn.l = c(1, 10, 50, 90, 99), pos = 1, offset = 0)
fan.txt(th.pn, pn.r = c(1, seq(10, 90, 20), 99), col = "royalblue", cex = 2)
##
##Prediction Intervals
##
th.pn <- pn(sims = th.mcmc, p.int=seq(10,90,10), type="intervals")
head(th.pn)
plot(NULL, type = "n", xlim = c(1, 945), ylim = range(th.pn), ylab = "Theta")
fan(th.pn, ln=c(50,80,90), hl.lab=c("L","U"))
fan.txt(th.pn, pn.l = c(10,30,70), hl.lab=c("L","U"))
Run the code above in your browser using DataLab