Descriptive.stat {ComparisonSurv} | R Documentation |

## Summarize Descriptive Statistics Commonly Used in Survival Data

### Description

A function used to produce result summaries of the results of various descriptive statistics.

### Usage

```
Descriptive.stat(time, status, group, tau="observed", alpha=0.05)
```

### Arguments

`time` |
The follow up time for right censored data. |

`status` |
The status indicator, normally 1=event, 0=alive or right censored. |

`group` |
The group indicator for comparison, and the elements of this vector must take either 0 or 1. Normally, 0= control group, 1= treatment group. |

`tau` |
The truncation time point (numeric) for the RMST calculation, which needs to be smaller than or equal to the minimum of the largest observed time in each of the two groups. When tau="observed" (default), the minimum of the largest observed time in each of the two groups is used. It can be changed tp tau="event" to choose the minimum of the largest event time in each of the two groups. |

`alpha` |
The significance level, the default is 0.05. |

### Value

A list containing the following components:

`result.summary` |
The summary statistics in each group, including sample.size, the number of event (event.num), censoring.rate, max.observed.time, max.event.time. |

`result.mean` |
The results of mean survival time in each group. |

`result.quantile` |
Quantiles and 0.95 CI of survival time in each group. |

`tau` |
The truncation time point for the restricted mean survival time (RMST) calculation. |

`result.RMST` |
The results of RMST in each group. See references for details. |

### Examples

```
#get 'Crossdata' from package
data(Crossdata)
data2<-Crossdata
#
#get result of descriptive statistics with tau=the minimum of the largest observed time
Descriptive.stat(data2$time, data2$status, data2$group,tau="observed")
#get result of descriptive statistics with tau=the minimum of the largest event time
Descriptive.stat(data2$time, data2$status, data2$group,tau="event")
```

*ComparisonSurv*version 1.1.1 Index]