Description Usage Arguments Details Value Author(s) See Also Examples
Creates an object of the accrued
class for use in the plot, summary, and error functions in the accrued package.
1 | data.accrued(data, start = NULL, final = NULL)
|
data |
A matrix of time series data, with rows as consecutive encounter dates and columns as accrual lag. |
start |
The start date. If none is specified it defaults to 1. |
final |
Vector of final counts for each encounter date. If omitted, the final column of |
The function converts a matrix of patrically accrued counts into an accrued
object.
The value at the ith row and jth column of data
represent the count for encounter
date i as known j-1 days after the encounter date. If final
is not specified,
the last column of data
is used as the final count.
Summary and plot methods exist for objects of this class. Several additional graph types are available, including barcode
, uploadPattern
,
laggedTSarray
and lagHistogram
.
data.accrued
returns an object of the accrued
class.
An object of the accrued
class is a list containing the following components:
final |
Vector of final counts |
data |
Matrix of counts. The value at the ith row and jth column represent the count for encounter date i as known j-1 days after the encounter date. |
start |
List of boolean start variable and start date |
Print, summary and plot methods exist for objects of the accrued
class.
Julie Eaton and Ian Painter
print.accrued
,
plot.accrued
,
summary.accrued
,
plot.summary.accrued
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# simulated accrued data
data(accruedDataExample)
# Convert to data.accrued object
dat <- data.accrued(accruedDataExample)
dat$start
# This is 1 because no start date was specified.
dat # uses print.accrued
summary(dat) # uses summary.accrued
plot(summary(dat)) # produces a plot of the summary object
plot(dat) # plots time series of differences between lags
# Convert to data.accrued object, start date now specified.
dat <- data.accrued(accruedDataExample, start="2012-09-15")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.