EVOLUTION-MANAGER
Edit File: ratetable.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Rate table structure</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for ratetable {survival}"><tr><td>ratetable {survival}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Rate table structure </h2> <h3>Description</h3> <p>Description of the rate tables used by expected survival routines. </p> <h3>Details</h3> <p>A rate table contains event rates per unit time for some particular endpoint. Death rates are the most common use, the <code>survexp.us</code> table, for instance, contains death rates for the United States by year of age, sex, and calendar year. </p> <p>A rate table is structured as a multi-way array with the following attributes: </p> <dl> <dt>dim</dt><dd><p>the dimensions of the array</p> </dd> <dt>dimnames</dt><dd><p>a named list of dimnames. The names are used to match user data to the dimensions, e.g., see the <code>rmap</code> argument in the <code>pyears</code> example. If a dimension is categorical, such as <code>sex</code> in <code>survexp.us</code>, then the dimname itself is matched against user's data values. The matching ignores case and allows abbreviations, e.g., "M", "Male", and "m" all successfully match the <code>survexp.us</code> dimname of <code>sex=c("male", "female")</code>.</p> </dd> <dt>type</dt><dd><p>a vector giving the type of each dimension, which will be 1= categorical, 2= continuous, 3= date, 4= calendar year of a US rate table. If <code>type</code> is 3 or 4, then the corresponding cutpoints must be one of the calendar date types: Date, POSIXt, date, or chron. This allows the code to properly match user data to the ratetable. (The published US decennial rate tables' definition is that a subject does not begin to experience a new years' death rate on Jan 1, but rather on their next birthday. The actual impact of this delay on any given subjects' calculation is neglible, but the code has always tried to be correct.) </p> </dd> <dt>cutpoints</dt><dd><p>a list with one elment per dimension. If <code>type=1</code> then the corresponding list element should be NULL, otherwise it should be a vector of length <code>dim[i]</code> containing the starting point of the interval to which the corresponding row/col of the array applies. Cutpoints must be in the same units as the underlying table, e.g., the <code>survexp.us</code> table contains death rates per day, so the <code>age</code> cutpoint vector contains age in days while <code>year</code> contains a vector of Dates. Cutpoints do not need to be evenly spaced: the <code>survexp.us</code> table, for instance, originally had age divided up as 0-1 days, 1-7 days, 7-28 days, 28 days - 1 year, 2, 3, ... 119 years. (Changes in the source of the tables made it difficult to continue splitting out the first year.)</p> </dd> <dt>summary</dt><dd><p>an optional summarization function. If present, it will be called with a numeric matrix that has one column per dimension and one row per observation. The function returns a character string giving a summary of the data. This is used by some routines to print an informative message, and provides one way to inform users of a data mistake, e.g., if the printout states that all subjects are between 0.14 and 0.23 years old it is likely that the user's age variable was in years when it should have been in days. </p> </dd> <dt>dimid</dt><dd><p>optional attribute containing the names of the dimnames. If the dimnames list itself has names, this attribute will be ignored.</p> </dd> </dl> <h3>See Also</h3> <p><code><a href="survexp.html">survexp</a></code>, <code><a href="pyears.html">pyears</a></code>, <code><a href="survexp.us.html">survexp.us</a></code></p> <hr /><div style="text-align: center;">[Package <em>survival</em> version 2.44-1.1 <a href="00Index.html">Index</a>]</div> </body></html>