Learn R Programming

cg (version 1.0-2)

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

Description

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

Usage

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

Arguments

data
A cgPairedDifferenceData object, typically created by prepareCGPairedDifferenceData.
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 cgPairedDifferenceDescriptiveTable, 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 or paired difference, 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] The third row of simple difference summaries has GeoMean and SEGeoMean are set to . Fourth and fifth rows are also added with summaries of the paired ratio differences and percent differences. The StdDev and StdErr values are set to in these two rows. The GeoMean and SEGeoMean values are calculated via the the Delta Method, with the same caveats described above.

concept

  • exploratory
  • descriptive

Details

The returned table contains quantiles, means, sample sizes, and estimates of variability for each group, and also for the paired differences. It also presents the same summary measures for the paired differences from the groups. If the logscale option is specified (either explicitly, or implicitly from the cgPairedDifferenceData object), then the geometric mean and geometric standard error for each of the two groups are included. Also included are summary measures of the ratio and percent forms of the paired differences. See the Value section below for details.

Examples

Run this code
data(anorexiaFT)
anorexiaFT.data <- prepareCGPairedDifferenceData(anorexiaFT, format="groupcolumns",
                                                 analysisname="Anorexia FT",
                                                 endptname="Weight",
                                                 endptunits="lbs",
                                                 expunitname="Patient",
                                                 digits=1, logscale=TRUE)

descriptiveTable(anorexiaFT.data)

## Remove the geometric mean and standard error columns,
## and the Ratio / Percent Rows, since they are no longer applicable.

descriptiveTable(anorexiaFT.data, logscale=FALSE)

Run the code above in your browser using DataLab