- data
A data.table or data.frame object in longitudinal
format where each row represents an observation with known start and end
times. If data is a data.frame, augment() internally casts it to a
data.table.
- data_key
A keying variable used to identify subjects and define a key
for data (see data.table::setkey()).
- pattern
Either an integer, a factor, or a character variable with 2 or
3 unique values that gives each subject's terminal outcome schema. When 2
values are detected, they must be in the format: 0 = "alive", 1 = "dead".
When 3 values are detected, they must be: 0 = "alive",
1 = "dead during a transition", 2 = "dead after a transition has ended"
(see Details).
- time
The time variable used to identify duplicate transition times.
If omitted or set to NULL, polish() uses "augmented_int" when it is
available, then "augmented_num". If neither column exists, time must be
supplied explicitly.
- check_NA
If TRUE, data_key, pattern, and time are checked for
missing values. If any missing values are found, the function stops with an
error. Default is FALSE.
- copy
If FALSE (default), polish() keeps the historical
memory-efficient behavior and may modify caller-owned data by reference.
If TRUE, data is copied before any data.table operation so the input
object remains unchanged.
- verbosity
Controls informational output. Use "quiet" to suppress
status messages, "summary" for high-level phase messages and timing, and
"progress" for phase messages plus progress bars in long status-building
loops. The default is getOption("msmtools.verbosity", "quiet").