data.accrued: Data structure for partially accruing data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/data.accrued.R

Description

Creates an object of the accrued class for use in the plot, summary, and error functions in the accrued package.

Usage

1

Arguments

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 data is used for the final counts.

Details

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.

Value

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.

Author(s)

Julie Eaton and Ian Painter

See Also

print.accrued, plot.accrued, summary.accrued, plot.summary.accrued

Examples

 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")	

accrued documentation built on May 2, 2019, 4:01 p.m.