No articles match
Approximate Bayesian inference in epidist3 days ago
Background | Alternative approximate inference algorithms | Laplace method | Variational inference using ADVI | Pathfinder | Demonstration | Comparison of parameter posterior distributions | Comparison of resulting delay distributions | Comparison of time taken | Conclusion | References
Extending epidist3 days ago
Why extend epidist? | Adding a data source | Adding a model type | Exploring how cfrnow extends epidist | Getting help
Frequently asked questions and tips3 days ago
Working with posterior samples | Getting a data.frame of posterior samples | Using random variables (rvars) for uncertainty propagation | How can I assess whether sampling has converged? | How can I perform posterior predictive checks? | What is an observation in the meta model? | I'd like to run a simulation study | How are the default priors for epidist chosen? | How can I assess how sensitive the fitted posterior distribution is to the prior distribution used? | What do the parameters in my model output correspond to? | How can I generate predictions with my fitted epidist model? | How can I use the marginaleffects package with my fitted epidist model? | How can I use the cmdstanr backend? | References
Fitting to published estimates with the meta model3 days ago
What we need from a study | Setup | Simulating biased published estimates | Fitting and comparing models | A bias-adjusted fit to the summaries alone | Allowing studies to differ | What happens with the wrong metadata | A mixed fit: summaries plus individual records | Reference: the marginal model on the full line list | Comparing the fits | Real world estimates from epireview | Adjusting for the phase of the outbreak | The population level delay and the size of the phase bias | Does any one study drive the estimate? | Comparing with a modern re-analysis of the same line list | Learning more | References
Using epidist to estimate delay between symptom onset and positive test for an Ebola outbreak in Sierra Leone3 days ago
Using the cmdstanr backend | Data preparation | Fitting sex-district stratified delay distributions | Model fitting | Intercept-only model | Sex-stratified model | Sex-district stratified model | Posterior expectations | Linear predictor posteriors | Delay posterior distributions | Discrete probability mass function | Continuous probability density function | Conclusion | References
Getting started with epidist3 days ago
Key concepts in delay distribution estimation | Setup | Simulating data | Preprocessing the data | The observation process | Fitting models | Fit a model that doesn't account for censoring and truncation | Fit a model that accounts for biases and truncation | Compare the two models estimated delay parameters | Visualise posterior predictions of the true delay distribution | Learning more | References
Left truncation with delay_min3 days ago
Setup | Simulate left truncated data | Fit models with and without the adjustment | Compare parameter estimates | Compare the estimated delay distributions | Summary
Guide to the statistical models implemented in epidist3 days ago
Background | Forwards and backwards distributions | Right truncation | Interval censoring | The naive model | The latent model | Bounding the latent primary event time | A non-uniform primary event | The marginal model | The meta model | Sampling likelihoods | A reported mean | A reported standard deviation | A reported quantile | Summaries from the same study | A vector of summaries with a covariance | Reported distribution parameters | Individual level records | What we need from each study | The biased estimands | Censoring adjustment | An estimated growth rate | Left truncation | Quantiles of the estimands | References
Primary event distributions3 days ago
Background | Simulating from a growing epidemic | Uniform against exponential growth | A growth rate that varies | Identifying the growth rate | Summary | References
Frequently asked questions and tips21 days ago
Working with posterior samples | Getting a data.frame of posterior samples | Using random variables (rvars) for uncertainty propagation | How can I assess whether sampling has converged? | How can I perform posterior predictive checks? | What is an observation in the meta model? | I'd like to run a simulation study | How are the default priors for epidist chosen? | How can I assess how sensitive the fitted posterior distribution is to the prior distribution used? | What do the parameters in my model output correspond to? | How can I generate predictions with my fitted epidist model? | How can I use the marginaleffects package with my fitted epidist model? | How can I use the cmdstanr backend? | References
Using epidist to estimate delay between symptom onset and positive test for an Ebola outbreak in Sierra Leone21 days ago
Using the cmdstanr backend | Data preparation | Fitting sex-district stratified delay distributions | Model fitting | Intercept-only model | Sex-stratified model | Sex-district stratified model | Posterior expectations | Linear predictor posteriors | Delay posterior distributions | Discrete probability mass function | Continuous probability density function | Conclusion | References
Guide to the statistical models implemented in epidist21 days ago
Background | Forwards and backwards distributions | Right truncation | Interval censoring | The naive model | The latent model | Bounding the latent primary event time | A non-uniform primary event | The marginal model | The meta model | Sampling likelihoods | A reported mean | A reported standard deviation | A reported quantile | Summaries from the same study | A vector of summaries with a covariance | Reported distribution parameters | Individual level records | What we need from each study | The biased estimands | Censoring adjustment | An estimated growth rate | Left truncation | Quantiles of the estimands | References
Approximate Bayesian inference in epidist24 days ago
Background | Alternative approximate inference algorithms | Laplace method | Variational inference using ADVI | Pathfinder | Demonstration | Comparison of parameter posterior distributions | Comparison of resulting delay distributions | Comparison of time taken | Conclusion | References
Fitting to published estimates with the meta model24 days ago
What we need from a study | Setup | Simulating biased published estimates | Fitting and comparing models | A bias-adjusted fit to the summaries alone | Allowing studies to differ | What happens with the wrong metadata | A mixed fit: summaries plus individual records | Reference: the marginal model on the full line list | Comparing the fits | Real world estimates from epireview | Adjusting for the phase of the outbreak | The population level delay and the size of the phase bias | Comparing with a modern re-analysis of the same line list | Learning more | References
Getting started with epidist24 days ago
Key concepts in delay distribution estimation | Setup | Simulating data | Preprocessing the data | The observation process | Fitting models | Fit a model that doesn't account for censoring and truncation | Fit a model that accounts for biases and truncation | Compare the two models estimated delay parameters | Visualise posterior predictions of the true delay distribution | Learning more | References
Primary event distributions24 days ago
Background | Simulating from a growing epidemic | Uniform against exponential growth | A growth rate that varies | Identifying the growth rate | Summary | References
Left truncation with delay_min1 months ago
Setup | Simulate left truncated data | Fit models with and without the adjustment | Compare parameter estimates | Compare the estimated delay distributions | Summary
Analytic solutions for censored delay distributions1 months ago
Introduction | What are we going to do in this vignette | Analytic solutions for exponentially tilted primary event times | Uniform primary event time ($r=0$) | General partial expectation | General discrete censored delay distribution | Gamma distributed delay times | Gamma partial expectation | Survival function of $S_{+}$ for Gamma distribution | CDF form of $S_{+}$ for Gamma distribution | Gamma discrete censored delay distribution | Log-Normal distribution | Log-Normal partial expectation | Survival function of $S_{+}$ for Log-Normal distribution | CDF form of $S_{+}$ for Log-Normal distribution | Log-Normal discrete censored delay distribution | Weibull distribution | Weibull partial expectation | Survival function of $S_{+}$ for Weibull distribution | CDF form of $S_{+}$ for Weibull distribution | Weibull discrete censored delay distribution | Generalised gamma distribution | Generalised gamma partial expectation | Survival function of $S_{+}$ for generalised gamma distribution | CDF form of $S_{+}$ for generalised gamma distribution | Learning more | References
Extending epidist2 months ago
Why extend epidist? | Adding a data source | Adding a model type | Exploring how cfrnow extends epidist | Getting help
Temporal aggregation guide4 months ago
Packages | Data | Approach 1: Weekly timestep | Approach 2: Daily process, weekly reporting (fitted day-of-week) | Approach 3: Daily process, weekly reporting (structural) | Approach 4: Daily timestep | Comparison | Weekly scale | Daily scale | Runtime | Choosing an approach
Temporal aggregation guide4 months ago
Packages | Data | Approach 1: Weekly timestep | Approach 2: Daily process, weekly reporting (fitted day-of-week) | Approach 3: Daily process, weekly reporting (structural) | Approach 4: Daily timestep | Comparison | Weekly scale | Daily scale | Runtime | Choosing an approach
Getting Started with Epinowcast: Nowcasting4 months ago
Quick start | Package | Data | Filtering | Preprocessing | Visualising the data | Choosing a nowcast horizon | Nowcast target | The default model | Posterior predictions | Alternative models | Process model | Reference model: reporting delays | Fitting the alternative models | Results | Diagnostics | Comparing all models | Using package functions rather than S3 methods | Next steps
Getting Started with Epinowcast: Nowcasting4 months ago
Quick start | Package | Data | Filtering | Preprocessing | Visualising the data | Choosing a nowcast horizon | Nowcast target | The default model | Posterior predictions | Alternative models | Process model | Reference model: reporting delays | Fitting the alternative models | Results | Diagnostics | Comparing all models | Using package functions rather than S3 methods | Next steps
Comparing Inference Methods4 months ago
Overview | Setup | Model specifications | Fitting | NUTS with prior initialisation (default) | NUTS with pathfinder initialisation | Pathfinder (approximate inference) | Runtime comparison | Diagnostics | NUTS diagnostics | Pathfinder diagnostics | Nowcast comparison | Posterior parameter comparison | Updating with posterior-as-prior | Summary
Comparing Inference Methods4 months ago
Overview | Setup | Model specifications | Fitting | NUTS with prior initialisation (default) | NUTS with pathfinder initialisation | Pathfinder (approximate inference) | Runtime comparison | Diagnostics | NUTS diagnostics | Pathfinder diagnostics | Nowcast comparison | Posterior parameter comparison | Updating with posterior-as-prior | Summary
Estimating the effective reproduction number in real-time for a single timeseries with reporting delays4 months ago
Use case | What we have | What do we do | Getting setup | Introducing the data: COVID-19 hospitalisations in Germany | Overview | Data transformations | Filtering the data | Visualising the data | Model | Expected hospitalisations | Expected infections | Instantaneous reproduction number | Latent infections | Latent reporting delay and ascertainment | Specifying the model using epinowcast::enw_expectation() | Delay distribution | Defining the delay distribution | Specifying the model using epinowcast::enw_reference() | Observation model and nowcast | Defining the observation model | Specifying the model using epinowcast::enw_obs() | Fitting the model to COVID-19 hospitalisations in Germany | Preprocess the data | Fitting the epinowcast model | Specifying the fitting options | Compiling the model | Fitting the model | Visualising the Nowcast | Plotting the nowcast based on real-time data | Plotting the nowcast based on retrospective data | Posterior predictions for cases by date of positive test and report | Real-time and retrospective estimates of the effective reproduction number | Estimates of the delay from testing positive to hospitalisation both in real-time and retrospectively | Estimates of the number of expected hospitalisations both in real-time and retrospectively | Wrapping up | Summary | Strengths | Limitations | Alternative packages | References
Estimating the effective reproduction number in real-time for a single timeseries with reporting delays4 months ago
Use case | What we have | What do we do | Getting setup | Introducing the data: COVID-19 hospitalisations in Germany | Overview | Data transformations | Filtering the data | Visualising the data | Model | Expected hospitalisations | Expected infections | Instantaneous reproduction number | Latent infections | Latent reporting delay and ascertainment | Specifying the model using epinowcast::enw_expectation() | Delay distribution | Defining the delay distribution | Specifying the model using epinowcast::enw_reference() | Observation model and nowcast | Defining the observation model | Specifying the model using epinowcast::enw_obs() | Fitting the model to COVID-19 hospitalisations in Germany | Preprocess the data | Fitting the epinowcast model | Specifying the fitting options | Compiling the model | Fitting the model | Visualising the Nowcast | Plotting the nowcast based on real-time data | Plotting the nowcast based on retrospective data | Posterior predictions for cases by date of positive test and report | Real-time and retrospective estimates of the effective reproduction number | Estimates of the delay from testing positive to hospitalisation both in real-time and retrospectively | Estimates of the number of expected hospitalisations both in real-time and retrospectively | Wrapping up | Summary | Strengths | Limitations | Alternative packages | References
Example nowcast performance evaluation for model specification4 months ago
Packages | Data | Evaluating across a range of nowcast dates | Set the maximum delay | Specify a single model | Looping over multiple nowcast dates | Visual comparison of nowcasts | Evaluation of nowcast performance using scoringutils | Choosing a model specification using quantitative performance evaluation | Summarise performance by model specification | Interpreting the results | Summary
Getting Started with baselinenowcast4 months ago
Introduction | Packages | Data | Pre-processing | Run the baselinenowcast workflow | Visualizing the nowcast | Plot with draws for nowcast only | Add nowcast draws as thin gray lines | Add observed data and final data once | Summary
Nowcasting syndromic surveillance system data: a case study applied to the U.S. National Syndromic Surveillance Program (NSSP) data4 months ago
Introduction | About syndromic surveillance system data | Load packages | NSSP data pre-processing | Load in the line list data | Define the "syndrome" definition | Expand the diagnosis code and their corresponding time stamps into a long dataframe | Remove cases where the diagnoses code was reported before the visit start date by more than 24 hours | Obtain counts of cases by reference date (visit date) and report date (time of first diagnosis) | Pre-processing of larger synthetic dataset | Exploratory data analysis to identify an appropriate maximum delay | Format for baselinenowcast | Specify the baselinenowcast model | Run the baselinenowcast workflow | Summarise and plot the nowcast | Plot nowcast against later observed "final" data | Add observed data and final data once | Summary
ARIMA latent residuals: maths, priors, and usage4 months ago
Introduction | What an ARIMA term does | Using ARIMA terms in a formula | The kernel decomposition | Centring the integrated residual | Stationarity via partial autocorrelations | Group structure: dependent vs independent | Special cases | Priors | Where you can use it | Limitations | References
Latent process and periodic options for the growth-rate model4 months ago
Setup | Random walk on weeks | Integrated AR | Stationary AR | Gaussian process on weeks | Independent per-(week, group) effects | Day-of-week effects | Combining latent and periodic terms | Moving-average components | Fit diagnostics | When to reach for which
Model definition and implementation4 months ago
Introduction | Decomposition into expected final notifications and report delay components | Expected final notifications | Default model | Generalised model | Instantaneous reproduction number/growth rate | Latent infections/notifications | Latent reporting delay and ascertainment | Delay distribution | Parametric baseline hazard | Non-parametric reference date effect $\delta_{g,t,d}$ and report date effect $\epsilon_{g,t,d}$ | Centring | Observation model and nowcast | Accounting for reported cases with a missing reference date | Implementation | Summary of module-parameter mappings | References
ARIMA latent residuals: maths, priors, and usage4 months ago
Introduction | What an ARIMA term does | Using ARIMA terms in a formula | The kernel decomposition | Centring the integrated residual | Stationarity via partial autocorrelations | Group structure: dependent vs independent | Special cases | Priors | Where you can use it | Limitations | References
Latent process and periodic options for the growth-rate model4 months ago
Setup | Random walk on weeks | Integrated AR | Stationary AR | Gaussian process on weeks | Independent per-(week, group) effects | Day-of-week effects | Combining latent and periodic terms | Moving-average components | Fit diagnostics | When to reach for which
Model definition and implementation4 months ago
Introduction | Decomposition into expected final notifications and report delay components | Expected final notifications | Default model | Generalised model | Instantaneous reproduction number/growth rate | Latent infections/notifications | Latent reporting delay and ascertainment | Delay distribution | Parametric baseline hazard | Non-parametric reference date effect $\delta_{g,t,d}$ and report date effect $\epsilon_{g,t,d}$ | Centring | Observation model and nowcast | Accounting for reported cases with a missing reference date | Implementation | Summary of module-parameter mappings | References
Estimating reporting delays with the full and delay-only models4 months ago
Use case | Other tools for delay estimation | Two ways to estimate a delay | Getting set up | Simulating a reporting triangle | Fitting the full model | Fitting the delay-only model | Comparing the recovered delay parameters | Comparing the recovered delay distribution | Recovering the delay from data with missing cells | Using the delay-only estimate to set priors | When to use the delay-only model | References
Model Features Summary4 months ago
Overview | Core Capabilities | Different Timesteps and Timespans | Stratified and Multi-Group Nowcasting | Delay Modelling Approaches | Report Date Effects and Structural Reporting | Latent Process Models | Hierarchical Structure | Prior Specification | Missing Data Handling | Model Evaluation | Visualisation | Computational Options | Data Handling | Current Limitations | Further Reading
Estimating reporting delays with the full and delay-only models4 months ago
Use case | Other tools for delay estimation | Two ways to estimate a delay | Getting set up | Simulating a reporting triangle | Fitting the full model | Fitting the delay-only model | Comparing the recovered delay parameters | Comparing the recovered delay distribution | Recovering the delay from data with missing cells | Using the delay-only estimate to set priors | When to use the delay-only model | References
Model Features Summary4 months ago
Overview | Core Capabilities | Different Timesteps and Timespans | Stratified and Multi-Group Nowcasting | Delay Modelling Approaches | Report Date Effects and Structural Reporting | Latent Process Models | Hierarchical Structure | Prior Specification | Missing Data Handling | Model Evaluation | Visualisation | Computational Options | Data Handling | Current Limitations | Further Reading
Discretised distributions4 months ago
Available distributions | Discretisation and adjustment for maximum delay | Double interval censoring with primarycensored
Discretised distributions4 months ago
Available distributions | Discretisation and adjustment for maximum delay | Double interval censoring with primarycensored
Gaussian process latent terms: maths, priors, and usage4 months ago
Introduction | What a Gaussian process term does | Using Gaussian process terms in a formula | The kernel and Hilbert-space decomposition | Kernels and special cases | Group structure: dependent vs independent | Differencing order | Priors | Where you can use it | Limitations | References
Gaussian process latent terms: maths, priors, and usage4 months ago
Introduction | What a Gaussian process term does | Using Gaussian process terms in a formula | The kernel and Hilbert-space decomposition | Kernels and special cases | Group structure: dependent vs independent | Differencing order | Priors | Where you can use it | Limitations | References
Visualising Preprocessed Data5 months ago
Setup | Data | Preprocessing | Latest observations | Cumulative reporting delay | Reporting delay heatmap | Reporting delay quantiles | Notifications by delay group | Using the individual plot functions | Helper functions
Visualising Preprocessed Data5 months ago
Setup | Data | Preprocessing | Latest observations | Cumulative reporting delay | Reporting delay heatmap | Reporting delay quantiles | Notifications by delay group | Using the individual plot functions | Helper functions
Why it works6 months ago
Introduction | What are we going to do in this vignette | Censoring and right truncation problems in time to event analysis | Statistical model used in primarycensored | Censored delay time distribution | Survival function of time from the end of the primary censoring window to the secondary event time | CDF form of $S_+$ for uniform primary | Probability of secondary event time within a secondary censoring window | Connections to other approaches | Connection to Park et al 2024 | Learning more | References
Resources to help with model fitting using Stan7 months ago
Epinowcast and Stan | Ensuring you have the proper toolchain | Now install CmdStanR and CmdStan | Epinowcast modelling | Installation | Running your first model | Setting enw_fit_opts | Investigating the quality of the model fit | Sampler settings | chains | threads_per_chain | iter_warmup and iter_sampling | max_treedepth | adapt_delta | Some decent defaults | Model settings | Setting priors | Exploring your data | Posterior predictions | Approaches to solve common problems | My model takes too long to run | Divergent transitions | My $\hat{R}$s are high and my esss are low | The posterior estimates are very wide | Other resources | Technical issues | Learning more about Stan and Bayesian inference
Resources to help with model fitting using Stan7 months ago
Epinowcast and Stan | Ensuring you have the proper toolchain | Now install CmdStanR and CmdStan | Epinowcast modelling | Installation | Running your first model | Setting enw_fit_opts | Investigating the quality of the model fit | Sampler settings | chains | threads_per_chain | iter_warmup and iter_sampling | max_treedepth | adapt_delta | Some decent defaults | Model settings | Setting priors | Exploring your data | Posterior predictions | Approaches to solve common problems | My model takes too long to run | Divergent transitions | My $\hat{R}$s are high and my esss are low | The posterior estimates are very wide | Other resources | Technical issues | Learning more about Stan and Bayesian inference
Hierarchical nowcasting of age stratified COVID-19 hospitalisations in Germany8 months ago
Packages | Data | Data preprocessing | Models | Shared reporting delay distribution | Using the inflated posterior as a prior | Reference day of the week effect | Posterior predictions | Reporting day of the week effect | Age group variation | Variation based on reference date | Variation based on reference date stratified by age | Independent models for each age group. | Alternative models | Evaluation | Summary
Hierarchical nowcasting of age stratified COVID-19 hospitalisations in Germany8 months ago
Packages | Data | Data preprocessing | Models | Shared reporting delay distribution | Using the inflated posterior as a prior | Reference day of the week effect | Posterior predictions | Reporting day of the week effect | Age group variation | Variation based on reference date | Variation based on reference date stratified by age | Independent models for each age group. | Alternative models | Evaluation | Summary
Case studies8 months ago
Case studies8 months ago
Getting started with primarycensored8 months ago
Introduction | Packages in this getting started vignette. | Generating random samples with rprimarycensored() | Compute the primary event censored cumulative distribution function (CDF) for delays with pprimarycensored() | Compute the primary event censored probability mass function (PMF) with dprimarycensored() | Other key functionality | Learning more
Modular workflow demonstration9 months ago
Introduction | Packages | Data | Model specification | Pre-processing | Estimate delay | Apply the delay to generate a point nowcast | Create plot with data type as a variable | Estimate uncertainty | Generate probabilistic nowcast | Visualizing the nowcast | Plot with draws for nowcast only | Add nowcast draws as thin gray lines | Add observed data and final data once | Summary
Mathematical methods for baselinenowcast10 months ago
Overview | Notation | Pre-processing of the reporting triangle | Delay distribution estimation | Estimating the delay distribution from a reporting matrix | Estimating the delay distribution from a reporting triangle | Point nowcast generation | Uncertainty quantification | Generation of retrospective reporting triangles | Generation of retrospective point nowcast matrices | Fit an observation model to past nowcast errors | Probabilistic nowcast generation | Predicted probabilistic nowcast generation | Combine with observations to obtain probabilistic nowcasts | Zero-handling strategy | Default settings | References
Nowcasting nomenclature1 years ago
Hash-based Matched Pseudo-Random Number Generation3 years ago
Overview | Standards of Matching | Model World and Scenario | Model Implementation | Non-Identity Model Implementation | Higher Resolution Implementation | Comparison | Sampling