Skip to content

Commit

Permalink
check vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Nov 15, 2024
1 parent db2acdd commit d13f0ed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 3 additions & 2 deletions vignettes/approx-inference.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 3 additions & 2 deletions vignettes/ebola.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down
4 changes: 2 additions & 2 deletions vignettes/epidist.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
15 changes: 7 additions & 8 deletions vignettes/faq.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d13f0ed

Please sign in to comment.