Skip to content

Commit

Permalink
change vignette language to talk about marginal model
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Dec 3, 2024
1 parent ff89e3b commit 3a3aed2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
^pkgdown$
^vignettes/approx-inference\.Rmd$
^vignettes/ebola\.Rmd$
^vignettes/faq\.Rmd$
^\.lintr$
4 changes: 2 additions & 2 deletions vignettes/approx-inference.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ obs_cens_trunc_samp <- simulate_gillespie(seed = 101) |>
slice_sample(n = sample_size, replace = FALSE)
```

We now prepare the data for fitting with the latent individual model, and perform inference with HMC:
We now prepare the data for fitting with the marginal model, and perform inference with HMC:

```{r results='hide'}
linelist_data <- as_epidist_linelist_data(
Expand All @@ -155,7 +155,7 @@ time_hmc <- proc.time() - t

Note that for clarity above we specify `algorithm = "sampling"`, but if you were to call `epidist(data = data)` the result would be the same since `"sampling"` (i.e. HMC) is the default value for the `algorithm` argument.

Now, we fit^[Note that in this section, and above for the MCMC, the output of the call is hidden, but if you were to call these functions yourself they would display information about the fitting procedure as it occurs] the same latent individual model using each method in Section \@ref(other).
Now, we fit^[Note that in this section, and above for the MCMC, the output of the call is hidden, but if you were to call these functions yourself they would display information about the fitting procedure as it occurs] the same marginal model using each method in Section \@ref(other).
To match the four Markov chains of length 1000 in HMC above, we then draw 4000 samples from each approximate posterior.

```{r results='hide'}
Expand Down
4 changes: 2 additions & 2 deletions vignettes/ebola.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ Second, because we also did not supply an observation time column (`obs_date`),

## Model fitting

To prepare the data for use with the latent individual model, we define the data as being a `epidist_latent_model` model object:
To prepare the data for use with the marginal model, we define the data as being a `epidist_marginal_model` model object:

```{r}
obs_prep <- as_epidist_marginal_model(linelist_data)
head(obs_prep)
```

Now we are ready to fit the latent individual model.
Now we are ready to fit the marginal model.

### Intercept-only model

Expand Down
5 changes: 3 additions & 2 deletions vignettes/faq.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ linelist_data <- as_epidist_linelist_data(
obs_cens_trunc_samp$stime_upr,
obs_time = obs_cens_trunc_samp$obs_time
)
data <- as_epidist_latent_model(linelist_data)
data <- as_epidist_marginal_model(linelist_data)
fit <- epidist(
data,
formula = mu ~ 1,
seed = 1
seed = 1,
backend = "cmdstanr"
)
```

Expand Down

0 comments on commit 3a3aed2

Please sign in to comment.