|
1 | 1 | #' Marginal Coefficients from a 'brms' Model |
2 | 2 | #' |
3 | | -#' Calculate marginal coefficients from a \code{brms} |
| 3 | +#' Calculate marginal coefficients from a `brms` |
4 | 4 | #' generalized linear mixed model using the method proposed by Hedeker (2018). |
5 | 5 | #' |
6 | | -#' @param object A fitted brms model object that includes random effects. Required. |
| 6 | +#' @param object A fitted `brms` model object that includes random effects. Required. |
7 | 7 | #' @param summarize A logical value, whether or not to |
8 | 8 | #' calculate summaries of the posterior predictions. |
9 | | -#' Defaults to \code{TRUE}. |
| 9 | +#' Defaults to `TRUE`. |
10 | 10 | #' @param posterior A logical value whether or not to |
11 | 11 | #' save and return the posterior samples. Defaults |
12 | | -#' to \code{FALSE} as the assumption is a typical |
| 12 | +#' to `FALSE` as the assumption is a typical |
13 | 13 | #' use case is to return the summaries only. |
14 | 14 | #' @param index An optional integer vector, giving the posterior draws |
15 | 15 | #' to be used in the calculations. If omitted, defaults to all |
16 | 16 | #' posterior draws. |
17 | 17 | #' @param backtrans A character string indicating the type of |
18 | 18 | #' back transformation to be applied. Can be one of |
19 | | -#' \dQuote{response} meaning to use the response scale, |
20 | | -#' \dQuote{linear} or \dQuote{identity} meaning to use the linear predictor scale, |
| 19 | +#' "response" meaning to use the response scale, |
| 20 | +#' "linear" or "identity" meaning to use the linear predictor scale, |
21 | 21 | #' or a specific back transformation desired, from a possible list of |
22 | | -#' \dQuote{invlogit}, \dQuote{exp}, \dQuote{square}, or \dQuote{inverse}. |
| 22 | +#' "invlogit", "exp", "square", or "inverse". |
23 | 23 | #' Custom back transformations should only be needed if, for example, |
24 | 24 | #' the outcome variable was transformed prior to fitting the model. |
25 | 25 | #' @param k An integer providing the number of random draws to use for |
26 | | -#' integrating out the random effects. Only relevant when \code{effects} |
27 | | -#' is \dQuote{integrateoutRE}. |
| 26 | +#' integrating out the random effects. Only relevant when `effects = "integrateoutRE"`. |
28 | 27 | #' @param seed An \emph{optional} argument that controls whether (and if so what) random seed |
29 | 28 | #' to use. This can help with reproducibility of results. |
30 | 29 | #' It is missing by default. |
31 | | -#' @param ... Additional arguments passed to \code{bsummary()}, |
32 | | -#' and only relevant if \code{summarize} is \code{TRUE}. |
33 | | -#' @return A list with \code{Summary} and \code{Posterior}. |
34 | | -#' Some of these may be \code{NULL} depending on the arguments used. |
| 30 | +#' @param ... Additional arguments passed to [bsummary()], |
| 31 | +#' and only relevant if `summarize` is `TRUE`. |
| 32 | +#' @return A list with `Summary` and `Posterior`. |
| 33 | +#' Some of these may be `NULL` depending on the arguments used. |
35 | 34 | #' @references |
36 | 35 | #' Hedeker, D., du Toit, S. H., Demirtas, H. & Gibbons, R. D. (2018) |
37 | | -#' \doi{10.1111/biom.12707} |
| 36 | +#' [DOI: 10.1111/biom.12707](https://doi.org/10.1111/biom.12707). |
38 | 37 | #' \dQuote{A note on marginalization of regression parameters from mixed models of binary outcomes} |
39 | 38 | #' @importFrom data.table as.data.table |
40 | 39 | #' @importFrom stats formula |
|
0 commit comments