Skip to content

Commit

Permalink
test dynamite vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
santikka committed May 30, 2024
1 parent 2a71175 commit 041e4f0
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions vignettes/dynamite.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,16 @@ seatbelt_formula <-

Next, we fit the model

```{r seatbeltmodelfit, echo=TRUE, eval=TRUE, message=FALSE, error=FALSE, warning=FALSE}
```{r seatbeltmodelfitactual, echo=FALSE, eval=TRUE, error=FALSE, warning=FALSE, message=FALSE}
invisible(capture.output({
fit <- dynamite(
dformula = seatbelt_formula,
data = seatbelt, time = "year", group = "state",
chains = 4, refresh = 0
)
}))
```
```{r seatbeltmodelfit, echo=TRUE, eval=FALSE}
fit <- dynamite(
dformula = seatbelt_formula,
data = seatbelt, time = "year", group = "state",
Expand Down Expand Up @@ -282,7 +291,16 @@ Here, the `aux()` function creates a deterministic transformation of \(p_t\) def

![(#fig:multichanneldag) A directed acyclic graph for the multichannel model with arrows corresponding to the assumed direct causal effects. A cross-section at times \(t\), \(t+1\), and \(t+2\) is shown. The vertices and edges corresponding to the deterministic tranformation \(\log(p_t)\) are omitted for clarity.](dag.png){width=80%}

```{r multichannelfit, echo=TRUE, eval=TRUE, message=FALSE, error=FALSE, warning=FALSE}
```{r multichannelfitactual, echo=FALSE, eval=TRUE, error=FALSE, warning=FALSE, message=FALSE}
invisible(capture.output({
multichannel_fit <- dynamite(
dformula = multi_formula,
data = multichannel_example, time = "time", group = "id",
chains = 4, refresh = 0
)
}))
```
```{r multichannelfit, echo=TRUE, eval=FALSE}
multichannel_fit <- dynamite(
dformula = multi_formula,
data = multichannel_example, time = "time", group = "id",
Expand Down

0 comments on commit 041e4f0

Please sign in to comment.