Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spell check #325

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/create.R
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ create_gp_data <- function(gp = gp_opts(), data) {
#' # Applying a observation scaling to the data
#' create_obs_model(obs_opts(scale = list(mean = 0.4, sd = 0.01)), dates = dates)
#'
#' # Apply a custom week week lenght
#' # Apply a custom week week length
#' create_obs_model(obs_opts(week_length = 3), dates = dates)
create_obs_model <- function(obs = obs_opts(), dates) {
data <- list(
Expand Down
298 changes: 60 additions & 238 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,285 +1,107 @@
abbott
ac
accum
adj
al
args
aut
backcalc
backcalculation
badr
Badr
behavior
BH
Biarch
bool
Bosse
bp
BugReports
ccdf
cdf
centered
centred
BMC
Bracher
CMD
cmf
CMF
CMMID
COVID
Centers
CoV
Codecov
com
const
conv
convolving
countrycode
coutn
Cori
Covid
covr
cowplot
cre
crtp
Dirichlet
Dockerfile
ECDC
EpiNow
Epinow
Gruson
Habakuk
Hain
Hamada
IO
Inf
Jit
Kanjilal
Kucharski
LN
Leeuwen
Lifecycle
Lipsitch
Lison
LogNormal
Makevars
Matern
Mayol
Monkeypox
NUTs
Nowcasts
ORCID
PLoS
PMF
PRs
Poisson
Quilty
Riutort
Rmarkdown
Rstan
Rtools
Runtimes
SARS
Sanjat
Wellcome
backcalc
backcalculation
com
csv
ctb
ctor
dd
de
deconvolution
defato
dev
dewitt
DeWitt
diagSPD
dimss
discretised
dist
doi
dplyr
dt_settings
data.table
ECDC
ecuyer
edu
Eigen
ellis
elt
endif
dt
epidemia
epiforecasts
EpiForecasts
epinow
Epinow
EpiNow
EpiSoon
eq
et
fi
etc
filepath
finalising
focusses
focussing
forecastHybrid
frac
ggplot
github
gmail
Gostic
gov
gp
gqs
gt
Hamada
hellewell
Hellewell
hickson
Hickson
hpp
HPP
ht
https
ifndef
inf
Inf
initialisation
initialise
inits
int
io
IO
istream
jacobian
james
jhu
joel
joseph
jr
kableExtra
katharine
kgostic
knitr
lang
LazyData
lgamma
lifecycle
Lifecycle
lik
lengthscale
lineranges
LinkingTo
logmean
lognorm
logsd
lp
lpmf
lshtm
lt
lte
lub
lubridate
magrittr
Makevars
matern
Matern
math
Mayol
mathcal
mathrm
mc
Meakin
meaking
meanlog
mee
Mee
metacran
metoffice
mf
misspecified
monticone
Monticone
msg
munday
Munday
negbin
nht
Nikos
normalisation
nowcast
nowcasting
nowcasts
Nowcasts
num
NUTs
nz
oberserved
obs
optimisation
Optimised
oR
ORCID
org
ostream
ot
parallisation
param
params
paul
periodicty
pietro
Pietro
pmf
PMF
pmfs
poisson
Poisson
pos
pow
precommit
priori
prob
prog
parameterised
pngs
progressr
propto
PRs
pstream
purrr
Rcpp
RcppEigen
rds
README
realland
Rebased
Recoded
recon
reprex
rethrow
Riutort
rlang
rmarkdown
Rmarkdown
rnaturalearth
rng
roxygen
Roxygen
RoxygenNote
rstan
Rstan
rstaninc
rstantools
Rtools
Rts
Runtimes
rvalue
runtimes
sam
sd
sdlog
se
sebastian
seealso
sherratt
Sherratt
sim
sophie
spd
SPD
sR
stan
standardised
stanfit
StanHeaders
std
str
stringstream
struct
styler
summarise
summarises
supress
SystemRequirements
testland
testthat
thompson
thresold
tibbles
tidyr
tidyverse
timelimit
timeseries
tparams
trunc
truncnorm
typedef
typename
uchicago
uk
unconstrain
unito
unobs
uot
util
val
vals
var
VAR
variational
Variational
vars
vb
vec
vectorised
vscode
warmup
wellcomeopenres
wl
www
yyyy
2 changes: 1 addition & 1 deletion man/create_obs_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/estimate_infections.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This model used the following priors for the observation model

$\phi$ is truncated to be greater than 0 and with $\xi$, and $w$ normalised to sum to 1. Other priors are set by the user.

$GP_t$ is an approximate Hilbert space Gaussian process as defined in [@approxGP] using a Matern 3/2 kernel with a default boundary factor of 1.5 and basis functions scaled to be 20% of the number of days fitted. The length scale of the Gaussian process was given a log-normal prior with a mean of 21 days, and a standard deviation of 7 days truncated to be greater than 3 days and less than the lenght of the time-series. The standard deviation of magnitude of the Gaussian process was assumed to be 0.1. These settings are all changeable by the user. In addition the user can opt to make use of a different generative process or to instead remove the dependency on the previous value of $R_t$ each of these options impacts run-time and may alter the best use-case for the model.
$GP_t$ is an approximate Hilbert space Gaussian process as defined in [@approxGP] using a Matern 3/2 kernel with a default boundary factor of 1.5 and basis functions scaled to be 20% of the number of days fitted. The length scale of the Gaussian process was given a log-normal prior with a mean of 21 days, and a standard deviation of 7 days truncated to be greater than 3 days and less than the length of the time-series. The standard deviation of magnitude of the Gaussian process was assumed to be 0.1. These settings are all changeable by the user. In addition the user can opt to make use of a different generative process or to instead remove the dependency on the previous value of $R_t$ each of these options impacts run-time and may alter the best use-case for the model.

### Beyond the forecast horizon

Expand Down
6 changes: 3 additions & 3 deletions vignettes/estimate_secondary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ knitr::opts_chunk$set(
**This is a work in progress. Please consider submitting a PR to improve it.**

This model is based on a discrete convolution of primary cases, scaled based on the fraction (here described as the secondary fraction but depending on application potentially being the case fatality ratio, case hospitalisation ratio, or the hospitalisation fatality ratio), and a delay distribution that is assumed to follow a discretised daily log normal distribution.
This model can be thought of as a disrete time ordinary differential equation approximation generalised to log normal, rather than exponential, delay distributions.
This model can be thought of as a discrete time ordinary differential equation approximation generalised to log normal, rather than exponential, delay distributions.

We generalise this simple model beyond the incidence cases to also include prevalence indicators (for example hospital admissions and occupancy) where the secondary notifications can be thought of as depending on secondary notifications from the previous timestep, scaled current primary notications, and minus scaled historic primary notifications weighted by some delay distribution.
We generalise this simple model beyond the incidence cases to also include prevalence indicators (for example hospital admissions and occupancy) where the secondary notifications can be thought of as depending on secondary notifications from the previous timestep, scaled current primary notifications, and minus scaled historic primary notifications weighted by some delay distribution.

This model can be defined as follows,

Expand All @@ -29,7 +29,7 @@ This model can be defined as follows,

where $S_t$ and $P_t$ are observed primary and secondary notifications, $\hat{S}_t$ are expected secondary notifications, $\delta_p = 1$ and $\delta_c = -1$ when $S_t$ is a prevalence measure, $delta_p = 0$ and $\delta_c = 1$ when it is an incidence based measure.
$\alpha$ and $\xi$ are defined as the secondary fraction and delay from primary to secondary notification (or delay from secondary notification to recovery etc in the prevalence case) with $\alpha$ typically being of most interest to those interpreting the models posterior estimates.
We further assume that $\xi$ follows a discretised log normal distibution described by its mean $\mu$ and standard deviation $\sigma$ on the log scale (where we take the cumulative mass function for time $t$ minus the cumlative mass function for $t-1$) normalised by the maximum allowed delay $D$ such that $\sum^D_{\tau=0}{ \xi(\tau | \mu, \sigma)} = 1$.
We further assume that $\xi$ follows a discretised log normal distribution described by its mean $\mu$ and standard deviation $\sigma$ on the log scale (where we take the cumulative mass function for time $t$ minus the cumulative mass function for $t-1$) normalised by the maximum allowed delay $D$ such that $\sum^D_{\tau=0}{ \xi(\tau | \mu, \sigma)} = 1$.

The above definition captures our mechanistic assumptions for the expectation of secondary notifications but does not account for potential observation noise or reporting patterns.
Here we assume a negative binomial observation model (though our implementation also supports a Poisson observation model) in order to capture potential reporting overdispersion $\phi$ and adjust expected counts using an optional day of the week effect based on a simplex $\omega_{(t \mod 7)}$ (such that $\sum^6_{t=0}{w_t} = 7$ so the total effect over a week is balanced).
Expand Down