|
18 | 18 | #' |
19 | 19 | #' In \code{formula} most shortcut notation allowed by \code{lmer()} function is |
20 | 20 | #' also allowed by \code{ds.lmerSLMA}. Many LMEs can be fitted very simply using a formula like: |
21 | | -#' \deqn{y~a+b+(1|c)} |
| 21 | +#' \deqn{y ~ a + b + (1 | c)} |
22 | 22 | #' which simply means fit an LME with \code{y} as the outcome variable with \code{a} and \code{b} |
23 | 23 | #' as fixed effects, and \code{c} as a random effect or grouping factor. |
24 | 24 | #' |
25 | 25 | #' It is also possible to fit models with random slopes by specifying a model such as |
26 | | -#' \deqn{y~a+b+(1+b|c)} |
| 26 | +#' \deqn{y ~ a + b + (1 + b | c)} |
27 | 27 | #' where the effect of \code{b} can vary randomly between groups defined by \code{c}. |
28 | | -#' Implicit nesting can be specified with formulae such as \eqn{y~a+b+(1|c/d)} |
29 | | -#' or \eqn{y~a+b+(1|c)+(1|c:d)}. |
| 28 | +#' Implicit nesting can be specified with formulae such as \eqn{y ~ a + b + (1 | c / d)} |
| 29 | +#' or \eqn{y ~ a + b + (1 | c) + (1 | c : d)}. |
30 | 30 | #' |
31 | 31 | #' The \code{dataName} argument avoids you having to specify the name of the |
32 | 32 | #' data frame in front of each covariate in the formula. |
33 | 33 | #' For example, if the data frame is called \code{DataFrame} you avoid having to write: |
34 | | -#' \eqn{DataFrame$y~DataFrame$a+DataFrame$b+(1|DataFrame$c)}. |
| 34 | +#' \eqn{DataFrame\$y ~ DataFrame\$a + DataFrame\$b + (1 | DataFrame\$c)}. |
35 | 35 | #' |
36 | 36 | #' The \code{checks} argument verifies that the variables in the model are all defined (exist) |
37 | 37 | #' on the server-site at every study |
|
124 | 124 | #' @return \code{ds.lmerSLMA} returns a list of elements mentioned |
125 | 125 | #' below separately for each study. |
126 | 126 | #' @return \code{coefficients}: a matrix with 5 columns: |
127 | | -#' \itemize{ |
| 127 | +#' \describe{ |
128 | 128 | #' \item{First}{: the names of all of the regression parameters (coefficients) in the model} |
129 | 129 | #' \item{second}{: the estimated values} |
130 | 130 | #' \item{third}{: corresponding standard errors of the estimated values} |
|
192 | 192 | #' |
193 | 193 | #' # Fit the lmer |
194 | 194 | #' |
195 | | -#' ds.lmerSLMA(formula = "BMI ~ incid_rate + diabetes + (1 | Male)", |
| 195 | +#' ds.lmerSLMA(formula = "BMI ~ incid_rate + diabetes + (1 | Male)", |
196 | 196 | #' dataName = "D.comp", |
197 | 197 | #' datasources = connections) |
198 | 198 | #' |
|
0 commit comments