plot-fitsir-missing-method: Plot a fitsir object

Description Usage Arguments Examples

Description

Plot a fitsir object

Usage

1
2
3
4
5
## S4 method for signature 'fitsir,missing'
plot(x, level, method = c("delta", "mvrnorm",
  "wmvrnorm"), main, xlim, ylim, xlab, ylab, add = FALSE,
  col.traj = "black", lty.traj = 1, col.conf = "red", lty.conf = 4,
  ...)

Arguments

x

fitsir object

level

the confidence level required

method

confidence interval method

main

an overall title for the plot

xlim

the x limit of the plot

ylim

the y limit of the plot

xlab

a label for the x axis

ylab

a label for the y axis

add

(logical) add to an existing plot?

col.traj

colour of the estimated trajectory

lty.traj

line type of the estimated trajectory

col.conf

colour of the confidence intervals

lty.conf

line type of the confidence intervals

...

additional arguments to be passed on to the plot function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
harbin2 <- setNames(harbin, c("times", "count"))
ss <- startfun(harbin2, type="death")
ff <- fitsir(harbin2, start=ss, type="death", method="BFGS")
plot(ff)

ff2 <- fitsir(harbin2, start=c(ss, ll.k=5), type="death", dist="nbinom", method="BFGS")
ff3 <- fitsir(harbin2, start=ss, type="death", dist="quasipoisson", method="BFGS")
plot(ff2, level=0.95, col.traj="red", main="Negative binomial error vs. Quasipoisson error CIs")
plot(ff3, add=TRUE, level=0.95, col.traj="blue", col.conf="blue")
legend(2, 270, legend = c("NB2", "Quasipoisson"), col=c("red", "blue"), lty=1)

bbolker/fitsir documentation built on June 4, 2019, 8:28 a.m.