R: Convert observed time points in Copenhagen Stroke Study data...
dis.cost
R Documentation
Convert observed time points in Copenhagen Stroke Study data set
Description
This function rounds up the observed number of days in the cost data set (contained in R package pec) to full years.
Usage
dis.cost(cost)
Arguments
cost
data set
Value
A data frame that contains the same variables as the cost data frame in R package pec. The only difference between cost and the output of dis.cost are the units of the event times. In cost, event times are measured in days whereas dis.cost results in a data frame with event times measured in years.
References
Joergensen HS, Nakayama H, Reith J, Raaschou HO, and Olsen TS.
Acute stroke with atrial fibrillation. The Copenhagen Stroke Study. Stroke,
27(10):1765-9, 1996.
Mogensen UB, Ishwaran H, and Gerds TA. Evaluating random forests for
survival analysis using prediction error curves. Journal of Statistical Software,
50(11), 2012.
Examples
data(cost)
d.cost <- dis.cost(cost)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DStree)
Loading required package: rpart
Loading required package: pec
Loading required package: prodlim
Loading required package: Ecdat
Loading required package: Ecfun
Attaching package: 'Ecfun'
The following object is masked from 'package:base':
sign
Attaching package: 'Ecdat'
The following object is masked from 'package:datasets':
Orange
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DStree/dis.cost.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dis.cost
> ### Title: Convert observed time points in Copenhagen Stroke Study data set
> ### Aliases: dis.cost
>
> ### ** Examples
>
> data(cost)
> d.cost <- dis.cost(cost)
>
>
>
>
> dev.off()
null device
1
>