nriskReport {greport} | R Documentation |
Number at Risk Report
Description
Graph number of subjects at risk
Usage
nriskReport(
formula,
groups = NULL,
time0 = "randomization",
data = NULL,
subset = NULL,
na.action = na.retain,
ylab = "Number Followed",
panel = "nrisk",
head = NULL,
tail = NULL,
h = 5.5,
w = 5.5,
outerlabels = TRUE,
append = FALSE,
popts = NULL
)
Arguments
formula |
a formula with time and the left hand side, and with variables on the right side being possible stratification variables. If no stratification put |
groups |
a character string naming a superpositioning variable. Must also be included in |
time0 |
a character string defining the meaning of time zero in follow-up. Default is |
data |
data frame |
subset |
a subsetting epression for the entire analysis |
na.action |
a NA handling function for data frames, default is |
ylab |
character string if you want to override |
panel |
character string. Name of panel, which goes into file base names and figure labels for cross-referencing. The default is |
head |
character string. Specifies initial text in the figure caption, otherwise a default is used |
tail |
optional character string. Specifies final text in the figure caption, e.g., what might have been put in a footnote in an ordinary text page. This appears just before any needles. |
h |
numeric. Height of plot, in inches |
w |
numeric. Width of plot |
outerlabels |
logical that if |
append |
logical. Set to |
popts |
list specifying extra arguments to pass to |
Details
nriskReport
generates multi-panel charts, separately for categorical analysis variables. Each panel depicts the number at risk as a function of follow-up time. The Hmisc Ecdf
function is used. Stratification is by treatment or other variables. It is assumed that this function is only run on randomized subjects. If an id
variable is present but groups
and stratification variables are not, other plots are also produced: a histogram of the number of visits per subject, a histogram of times at which subjects have visits, the average number of contacts as a function of elapsed time, and a histogram showing the distribution of the longest gap between visits over subjects.
Examples
# See test.Rnw in tests directory