Learn R Programming

greport (version 0.5-2)

nriskReport: Number at Risk Report

Description

Graph number of subjects at risk

Usage

nriskReport(formula, groups = NULL, 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 1 as the right hand side. Specify unique subject IDs by including a term id() if
groups
a character string naming a superpositioning variable. Must also be included in formula.
data
data frame
subset
a subsetting epression for the entire analysis
na.action
a NA handling function for data frames, default is na.retain
ylab
character string if you want to override "Number Followed"
panel
character string. Name of panel, which goes into file base names and figure labels for cross-referencing. The default is 'nrisk'.
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 TRUE, pass lattice graphics through the latticeExtra package's useOuterStripsfunction if there are two conditioning (paneling) variables, to put panel labels in outer margins.
append
logical. Set to FALSE to start a new panel
popts
list specifying extra arguments to pass to Ecdf. A common use is for example popts=list(layout=c(columns,rows)) to be used in rendering lattice plots. key and panel are also frequently use

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.

Examples

Run this code
# See test.Rnw in tests directory

Run the code above in your browser using DataLab