Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
drizopoulos committed Jun 18, 2024
1 parent 6e9ac3c commit 0bdbf3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions man/jm.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ and \code{"backward"}.}

\details{
The mathematical details regarding the definition of the multivariate joint model, and the capabilities of the package can be found in the vignette in the doc directory.

Notes:
\itemize{
\item{The ordering of the subjects in the datasets used to fit the mixed and Cox regression models needs to be the same.}
\item{The units of the time variables in the mixed and Cox models need to be the same.}
}
}

\value{
Expand Down
6 changes: 6 additions & 0 deletions vignettes/JMbayes2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ and the density plot with the call:
ggdensityplot(jointFit1, "alphas")
```

### Notes

- The ordering of the subjects in the datasets used to fit the mixed and Cox regression models needs to be the same.

- The units of the time variables in the mixed and Cox models need to be the same.

## Multivariate
To fit a joint model with multiple longitudinal outcomes, we simply provide a list of mixed models as the second argument of `jm()`. In the following example, we extend the joint model we fitted above by also including the prothrombin time and the log odds of the presence or absence of ascites as time-varying covariates in the relative risk model for the composite event. Ascites is a dichotomous outcome, and therefore, we fit a mixed-effects logistic regression model for it using the `mixed_model()` function from the **GLMMadaptive** package. The use of `||` in the `random` argument of `mixed_model()` specifies that the random intercepts and random slopes are assumed uncorrelated. In addition, the argument `which_independent` can be used to specify which longitudinal outcomes are to be assumed independent; here, as an illustration, we specify that the first (i.e., serum bilirubin) and second (i.e., prothrombin time) longitudinal outcomes are independent. To assume that all longitudinal outcomes are independent, we can use `jm(..., which_independent = "all")`. Because this joint model is more complex, we increase the number of MCMC iterations, the number of burn-in iterations, and the thinning per chain using the corresponding control arguments:
```{r}
Expand Down

0 comments on commit 0bdbf3f

Please sign in to comment.