diff --git a/vignettes/approx-inference.Rmd b/vignettes/approx-inference.Rmd index e35ff88cb..800886476 100644 --- a/vignettes/approx-inference.Rmd +++ b/vignettes/approx-inference.Rmd @@ -133,10 +133,11 @@ We now prepare the data for fitting with the latent individual model, and perfor linelist <- as_epidist_linelist( obs_cens_trunc_samp$ptime_lwr, obs_cens_trunc_samp$ptime_upr, - obs_cens_trunc_samp$sdate_lwr, - obs_cens_trunc_samp$sdate_upr, + obs_cens_trunc_samp$stime_lwr, + obs_cens_trunc_samp$stime_upr, obs_time = obs_cens_trunc_samp$obs_time ) + data <- as_latent_individual(linelist) t <- proc.time() diff --git a/vignettes/ebola.Rmd b/vignettes/ebola.Rmd index 69d2c6424..fc40ad0fc 100644 --- a/vignettes/ebola.Rmd +++ b/vignettes/ebola.Rmd @@ -219,10 +219,11 @@ To prepare the data for use with the latent individual model, we set `obs_cens` linelist <- as_epidist_linelist( obs_cens$ptime_lwr, obs_cens$ptime_upr, - obs_cens$sdate_lwr, - obs_cens$sdate_upr, + obs_cens$stime_lwr, + obs_cens$stime_upr, obs_time = obs_cens$obs_time ) + obs_prep <- as_latent_individual(linelist) head(obs_prep) ``` diff --git a/vignettes/epidist.Rmd b/vignettes/epidist.Rmd index e3c2f1f18..217d5295c 100644 --- a/vignettes/epidist.Rmd +++ b/vignettes/epidist.Rmd @@ -250,8 +250,8 @@ To do so, we first prepare the `data` using `as_latent_individual()`: linelist <- as_epidist_linelist( obs_cens_trunc_samp$ptime_lwr, obs_cens_trunc_samp$ptime_upr, - obs_cens_trunc_samp$sdate_lwr, - obs_cens_trunc_samp$sdate_upr, + obs_cens_trunc_samp$stime_lwr, + obs_cens_trunc_samp$stime_upr, obs_time = obs_cens_trunc_samp$obs_time ) diff --git a/vignettes/faq.Rmd b/vignettes/faq.Rmd index 21ba86bba..56770d890 100644 --- a/vignettes/faq.Rmd +++ b/vignettes/faq.Rmd @@ -47,14 +47,13 @@ obs_cens_trunc_samp <- simulate_gillespie(seed = 101) |> filter(.data$stime_upr <= obs_time) |> slice_sample(n = sample_size, replace = FALSE) -# Note: this functionality will be integrated into the package shortly -as_epidist_linelist_time <- function(data) { - class(data) <- c("epidist_linelist", class(data)) - epidist_validate_data(data) - return(data) -} - -linelist <- as_epidist_linelist_time(obs_cens_trunc_samp) +linelist <- as_epidist_linelist( + obs_cens_trunc_samp$ptime_lwr, + obs_cens_trunc_samp$ptime_upr, + obs_cens_trunc_samp$stime_lwr, + obs_cens_trunc_samp$stime_upr, + obs_time = obs_cens_trunc_samp$obs_time +) data <- as_latent_individual(linelist) fit <- epidist(