You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: R/group_data.R
+20-18
Original file line number
Diff line number
Diff line change
@@ -8,25 +8,25 @@
8
8
#' @param timevarName Name of new time dependent variable
9
9
#' @param timeid Variable name for new index field. Defaults to "timevar"
10
10
#' @param perName Variable name for period field. Defaults to "period"
11
-
#' @param perVec Vector of period times. Defaults to NULL
11
+
#' @param periodVec Vector of period times. Defaults to NULL
12
12
#' @details It is possible to generate longitudinal data with varying
13
13
#' numbers of measurement periods as well as varying time intervals between
14
14
#' each measurement period. This is done by defining specific variables \emph{in} the
15
15
#' data set that define the number of observations per subject and the average
16
16
#' interval time between each observation. \bold{\emph{nCount}} defines the number of
17
17
#' measurements for an individual; \bold{\emph{mInterval}} specifies the average time between
18
-
#' intervals for a subject; and vInterval specifies the variance of those
19
-
#' interval times. If \bold{\emph{vInterval}} is set to 0 or is not defined, the interval for
18
+
#' intervals for a subject; and \bold{\emph{vInterval}} specifies the variance of those
19
+
#' interval times. If \bold{\emph{mInterval}} is not defined, no intervals are used. If \bold{\emph{vInterval}} is set to 0 or is not defined, the interval for
20
20
#' a subject is determined entirely by the mean interval. If \bold{\emph{vInterval}} is
21
21
#' greater than 0, time intervals are generated using a gamma distribution
22
22
#' with specified mean and dispersion. If either \bold{\emph{nPeriods}} or \bold{\emph{timevars}}
23
23
#' is specified, that will override any \bold{\emph{nCount}}, \bold{\emph{mInterval}}, and
24
24
#' \bold{\emph{vInterval}} data.
25
25
#'
26
-
#' \bold\emph{{perVec}} is used to specify measurement periods that are different
27
-
#' the default counting variables. If \bold\emph{{perVec}} is not specified,
26
+
#' \bold{\emph{periodVec}} is used to specify measurement periods that are different
27
+
#' the default counting variables. If \bold{\emph{periodVec}} is not specified,
28
28
#' the periods default to \emph{0, 1, ... n-1}, with \emph{n} periods. If
29
-
#' \bold\emph{{perVec}} is specified as \emph{c(x_1, x_2, ... x_n)}, then
29
+
#' \bold{\emph{periodVec}} is specified as \emph{c(x_1, x_2, ... x_n)}, then
30
30
#' \emph{x_1, x_2, ... x_n} represent the measurement periods.
31
31
#' @return An updated data.table that that has multiple rows
0 commit comments