Learn R Programming

cg (version 0.9.0)

descriptiveTable.cgOneFactorData: Compute Descriptive Summary Statistics of Groups in a cgOneFactorData object

Description

Create a table of quantiles and other summary statistics of the data in a cgOneFactorData object.

Usage

## S3 method for class 'cgOneFactorData':
descriptiveTable(data, display = "print", \dots)

Arguments

data
A cgOneFactorData object, typically created by prepareCGOneFactorData.
display
One of three valid values: [object Object],[object Object],[object Object]
...
Additional arguments. Currently only one is valid: [object Object]

Value

  • Creates an object of class cgOneFactorDescriptiveTable, with the following slots: [object Object],[object Object] The data frame structure of the descriptive table in a contents slot consists of row.names that specify the group, and these columns: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] If logscale=TRUE, then two additional columns are added: [object Object],[object Object] If censored data are present in the cgOneFactorData object, then two more columns are added: [object Object],[object Object] These two ncensored and ncomplete quantities will add up to n above and be placed adjacent to it. The presence of censored observations will convert columns such as the Min and Max to character values, with the appropriate ">" and "<" symbols="" for="" right-censoring="" and="" left-censoring,="" respectively.="" censored="" data,="" kaplan-meier="" estimates="" are="" used="" the="" quantiles,="" as="" proposed="" by="" gentleman="" crowley="" (1991).="" survreg::survfit conventions are followed for interpolation of these quantiles. With enough censored data observations in a group, certain quantiles may not be estimable. If any censored observations are present, the mean, geometric mean, and associated standard errors will not be calculated. The character representation is used.

concept

  • exploratory
  • descriptive

Details

The returned table contains quantiles, means, sample sizes, and estimates of variability for each group. If censored data are present, the estimated quantiles accomodate that with the Kaplan-Meier method, following Gentleman and Crowley (1991) . The number of censored / incomplete and number of complete observations are also included when censored data is present in any of the groups. If the logscale option is specified (either explicitly, or implicitly from the cgOneFactorData object), then the geometric mean and geometric standard error for each group are also included. See the Value section below for details.

References

Gentleman, R.C. and Crowley, J. (1991). "Graphical Methods for Censored Data", Journal of the American Statistical Association, Volume 86, 678-683.

Examples

Run this code
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
                                      analysisname="Canine",
                                      endptname="Prostate Volume",
                                      endptunits=expression(plain(cm)^3),
                                      digits=1, logscale=TRUE, refgrp="CC")

descriptiveTable(canine.data)

## Remove the geometric mean and standard error columns
descriptiveTable(canine.data, logscale=FALSE)

## Censored Data
data(gmcsfcens)
gmcsfcens.data <- prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
                                         analysisname="cytokine",
                                         endptname="GM-CSF (pg/ml)",
                                         logscale=TRUE)
descriptiveTable(gmcsfcens.data)

Run the code above in your browser using DataLab