Skip to content

Commit

Permalink
output.var to vignette, run-extended
Browse files Browse the repository at this point in the history
  • Loading branch information
santikka committed Apr 24, 2024
1 parent 1e76bad commit 7621de8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vignettes/dynamite_custom.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ dynamite_code <- get_code(f, data = gaussian_example, time = "time", group = "i
```
Calling `cat(dynamite_code)` code then prints the code, or you can write it directly to a file for example with `sink()`. The `get_code` method also works for `dynamitefit` object, e.g., `get_code(gaussian_example_fit)`.

Consider for example that instead of normal distribution for the random effects, you would like to use $t$-distributed random effects. This is not directly supported by the `dynamite`, but the previously obtained Stan code is easy to modify for this. We replace the line ` to_vector(nu_raw) ~ std_normal();` in the model block of original model code with
```{stan, eval = FALSE}
Consider for example that instead of normal distribution for the random effects, you would like to use $t$-distributed random effects. This is not directly supported by the `dynamite`, but the previously obtained Stan code is easy to modify for this. We replace the line `to_vector(nu_raw) ~ std_normal();` in the model block of original model code with
```{stan, eval = FALSE, output.var = "temp"}
df ~ gamma(2, 0.1);
to_vector(nu_raw) ~ student_t(df, 0, 1);
```
Expand Down

0 comments on commit 7621de8

Please sign in to comment.