Description Usage Arguments See Also Examples
fitting function
1 2 3 4 |
data |
data frame |
start |
starting parameters |
dist |
conditional distribution of reported data |
type |
type of reported data |
method |
optimization method (see mle2) |
control |
control parameters for optimization |
tcol |
column name for time variable |
icol |
column name for count variable |
debug |
print debugging output? |
... |
Further arguments to pass to optimizer |
optimizer |
optimizer to be used (see mle2) |
startfun mle2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | harbin2 <- setNames(harbin,c("times","count"))
(f1 <- fitsir(harbin2,
start=c(beta=2, gamma=1, N=2e3, i0=0.0001, sigma=10),
type="death"))
plot(f1)
## CRUDE R^2 analogue (don't trust it too far!)
ss <- SIR.detsim(harbin2$times,trans.pars(coef(f1)), type="death")
cc <- harbin2$count
cor(ss, cc)^2
f1_g2 <- fitsir(harbin2,
start=c(beta=2, gamma=1, N=2e3, i0=0.0001),
family="gaussian2",
type="death")
plot(f1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.