Summarize one or more variables (x) by a paired time variable (y). Variables on the right side of the formula, i.e. independent variables, are summarized by the two time points on the left of the formula. Optionally, an appropriate test is performed to test the distribution of the independent variables across the time points.
paired( formula, data, id, na.action, subset = NULL, strata, control = NULL, ... )
an object of class
an optional data frame, list or environment (or object coercible by
The vector giving IDs to match up data for the same subject across two timepoints.
an optional vector specifying a subset of observations (rows of data) to be used in the results. Works as vector of logicals or an index.
a vector of strata to separate summaries by an additional group.
control parameters to handle optional settings within
additional arguments to be passed to internal
An object with class
c("paired", "tableby", "arsenal_table")
Do note that this function piggybacks off of
tableby quite heavily, so there is no
summary.paired function (for instance).
These tests are accepted:
paired.t: a paired
mcnemar: McNemar's test.
signed.rank: a signed rank test.
sign.test: a sign test.
notest: no test is performed.
Jason Sinnwell, Beth Atkinson, Ryan Lennon, and Ethan Heinzen