bbolker / bbolker/fitsir

CI based on delta method vs sampling method

Open
#49 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

This might be something that's worth explaining/mentioning in the manuscript.

I saw your CI code in expgrowthfit and implemented it in fitsir as well and noticed that delta method and sampling method give significantly different results for CI.

You can try running the following code to see the difference:
```R
harbin2 <- setNames(harbin, c("times", "count"))
ff <- fitsir(harbin2, type="death", method="BFGS")
plot(ff, level=0.95) ## delta
plot(ff, level=0.95, method="sample") ## sampling method
```
If you use lower level (e.g. `level=0.1`), sampled CI even misses the mean maximum likelihood trajectory.

If you want to see all samples, you can try running
```R
predict(ff, level=0.95, method="sample", debug=TRUE)
```

If you want to see the actual code (should be identical to your code if I didn't make any mistakes), it's inside `predict` function under fitsir-methods.R.

There's something about non-linearity...

Contributor guide

No contributing guide indexed for this repository

Research direction

Run the supplied R example with fitsir and compare plot(ff, level=0.95) against the sampling method, then use predict(ff, level=0.95, method="sample", debug=TRUE) to inspect the samples. Read the predict function in fitsir-methods.R and determine why the delta and sampling confidence intervals differ; done means the discrepancy is explained and its manuscript documentation need is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.