Skip to content

Commit 234e723

Browse files
committed
build the manual
1 parent 9a62a92 commit 234e723

4 files changed

Lines changed: 36 additions & 20 deletions

File tree

R/ds.glmerSLMA.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
#' In \code{formula} most shortcut notation allowed by \code{glmer()} function is
1919
#' also allowed by \code{ds.glmerSLMA}.
2020
#' Many GLMEs can be fitted very simply using a formula like:
21-
#' \deqn{y~a+b+(1|c)}
21+
#' \code{y~a+b+(1|c)}
2222
#' which simply means fit an GLME with \code{y} as the outcome variable (e.g.
2323
#' a binary case-control using a logistic regression model or a count or a survival
2424
#' time using a Poisson regression model), \code{a} and \code{b}
2525
#' as fixed effects, and \code{c} as a random effect or grouping factor.
2626
#'
2727
#' It is also possible to fit models with random slopes by specifying a model such as
28-
#' \deqn{y~a+b+(1+b|c)}
28+
#' \code{y~a+b+(1+b|c)}
2929
#' where the effect of \code{b} can vary randomly between groups defined by \code{c}.
30-
#' Implicit nesting can be specified with formulas such as: \eqn{y~a+b+(1|c/d)}
31-
#' or \eqn{y~a+b+(1|c)+(1|c:d)}.
30+
#' Implicit nesting can be specified with formulas such as: \code{y~a+b+(1|c/d)}
31+
#' or \code{y~a+b+(1|c)+(1|c:d)}.
3232
#'
3333
#'
3434
#' The \code{dataName} argument avoids you having to specify the name of the
3535
#' data frame in front of each covariate in the formula.
3636
#' For example, if the data frame is called \code{DataFrame} you avoid having to write:
37-
#' \eqn{DataFrame$y~DataFrame$a+DataFrame$b+(1|DataFrame$c)}.
37+
#' \code{DataFrame$y~DataFrame$a+DataFrame$b+(1|DataFrame$c)}.
3838
#'
3939
#' The \code{checks} argument verifies that the variables in the model are all defined (exist)
4040
#' on the server-site at every study
@@ -228,9 +228,9 @@
228228
#'
229229
#' # Fit a Logistic regression model
230230
#'
231-
#' ds.glmerSLMA(formula = "Male ~ incid_rate +diabetes + (1 | age)",
231+
#' ds.glmerSLMA(formula = "Male ~ incid_rate +diabetes + (1 | age)",
232232
#' dataName = "D",
233-
#' datasources = connections[2],#only the second server is used (study2)
233+
#' datasources = connections[2], # only the second server is used (study2)
234234
#' family = "binomial")
235235
#'
236236
#'

R/ds.kurtosis.R

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@
44
#' @details The function calculates the kurtosis of an input variable x with three different methods.
55
#' The method is specified by the argument \code{method}. If x contains any missings, the function removes those before
66
#' the calculation of the kurtosis. If \code{method} is set to 1 the following formula is used
7-
#' \eqn{ kurtosis= \frac{\sum_{i=1}^{N} (x_i - \bar(x))^4 /N}{(\sum_{i=1}^{N} ((x_i - \bar(x))^2) /N)^(2) } - 3},
7+
#'
8+
#' \eqn{ kurtosis= \frac{\sum_{i=1}^{N} (x_i - \bar{x})^4 /N}{(\sum_{i=1}^{N} ((x_i - \bar{x})^2) /N)^2 } - 3},
9+
#'
810
#' where \eqn{ \bar{x} } is the mean of x and \eqn{N} is the number of observations. If \code{method} is set to 2
9-
#' the following formula is used \eqn{ kurtosis= ((N+1)*(\frac{\sum_{i=1}^{N} (x_i - \bar(x))^4 /N}{(\sum_{i=1}^{N} ((x_i - \bar(x))^2) /N)^(2) } - 3) + 6)*((N-1)/((N-2)*(N-3)))}.
10-
#' If \code{method} is set to 3 the following formula is used \eqn{ kurtosis= (\frac{\sum_{i=1}^{N} (x_i - \bar(x))^4 /N}{(\sum_{i=1}^{N} ((x_i - \bar(x))^2) /N)^(2) })*(1-1/N)^2 - 3}.
11+
#' the following formula is used
12+
#'
13+
#' \eqn{ kurtosis= ((N+1)*(\frac{\sum_{i=1}^{N} (x_i - \bar{x})^4 /N}{(\sum_{i=1}^{N} ((x_i - \bar{x})^2) /N)^2 } - 3) + 6)*((N-1)/((N-2)*(N-3)))}.
14+
#'
15+
#' If \code{method} is set to 3 the following formula is used
16+
#'
17+
#' \eqn{ kurtosis= (\frac{\sum_{i=1}^{N} (x_i - \bar{x})^4 /N}{(\sum_{i=1}^{N} ((x_i - \bar{x})^2) /N)^2 })*(1-1/N)^2 - 3}.
18+
#'
1119
#' This function is similar to the function \code{kurtosis} in R package \code{e1071}.
1220
#' @param x a string character, the name of a numeric variable.
1321
#' @param method an integer between 1 and 3 selecting one of the algorithms for computing kurtosis

man/ds.glmerSLMA.Rd

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ds.kurtosis.Rd

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)