Skip to content

Commit

Permalink
Covariates
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Sep 12, 2023
1 parent d2c5b50 commit 6985229
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vignettes/usage.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A mixed model of repeated measures (MMRM) analyzes longitudinal clinical trial d

# Data

To use the `brms.mmrm` package, begin with a longitudinal dataset with one row per patient observation and columns for the response variable, treatment group indicator, discrete time point indicator, patient ID variable, and optional baseline covariates such as age and region. If you do not have a real dataset of your own, you can simulate one from the package. The following dataset has the raw response variable and only the most essential factor variables. In general, the outcome variable can either be the raw response or change from baseline.
To use the `brms.mmrm` package, begin with a longitudinal dataset with one row per patient observation and columns for the response variable, treatment group indicator, discrete time point indicator, patient ID variable, and optional baseline covariates such as age and region. If you do not have a real dataset of your own, you can simulate one from the package. The following dataset has the raw response variable, the essential factor variables, and continuous baseline covariates.^[Covariates can be categorical too.] In general, the outcome variable can either be the raw response or change from baseline.

```{r}
library(brms.mmrm)
Expand All @@ -42,7 +42,7 @@ raw_data <- brm_simulate_simple(
raw_data
```

Next, create a special classed dataset that the package will recognize. The classed data object contains a pre-processed version of the data, along with attributes to declare the outcome variable, whether the outcome is response or change from baseline, the treatment group variable, the discrete time point variable, control group, baseline time point, and other details.
Next, create a special classed dataset that the package will recognize. The classed data object contains a pre-processed version of the data, along with attributes to declare the outcome variable, whether the outcome is response or change from baseline, the treatment group variable, the discrete time point variable, control group, baseline time point, and the covariates selected for analysis.

```{r}
data <- brm_data(
Expand Down

0 comments on commit 6985229

Please sign in to comment.