report.quali.hlev: 'Hierarchical Qualitative' statistics reporting...

Description Usage Arguments Details Value See Also Examples

View source: R/report.quali.hlev.R

Description

This function is mainly used to compute qualitative statistics when there are several events per statistical unit. Often used for reporting adverse events, medical history or concomitant treatments.

It reports frequencies and percentages according to hierarchical levels of two factors.

Typically, adverse event are classified according to System Organ Class (SOC) and then sub classified by Prefered Terms (PT). Several observations of a same adverse event can be observed several times on the same subject. It's then useful to know how many persons are concerned by at least one of those adverse events and report the frequencies for each classifications: SOC and PT.

This is exactly what this function does.

For more examples see the website: ClinReport website

Usage

1
2
3
report.quali.hlev(data, subjid = NULL, x1 = NULL, var_upper, var_lower,
  lower.levels = "Lower.Levels", upper.levels = "Upper.Levels",
  x1.label = NULL)

Arguments

data

A data frame

subjid

A character

x1

A character. Indicates a factor in the data frame.

var_upper

A character. Indicates a factor in the data frame which corresponds to the factor with the higher number of levels (typically SOC variable)

var_lower

A character. Indicates a factor in the data frame which corresponds to the factor with the lower number of levels (typically PT variable)

lower.levels

A character. The label to be displayed in the table for the lower terms

upper.levels

A character. The label to be displayed in the table for the upper terms

x1.label

A character. Not used for now

Details

The subjid argument is mandatory for this function.

Value

A desc object that can be used by the report.doc function.

See Also

report.quali emmeans report.doc desc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(adverse_event)

test=report.quali.hlev(data=adverse_event,subjid="SUBJID",var_upper="PTNAME",
var_lower="SOCNAME",lower.levels="System Organ Class",upper.levels="Prefered Terms",x1="randtrt")

# show results in console
test

# show formatted results in HTML
ft=report.doc(test,valign=TRUE)
ft

ClinReport documentation built on Sept. 3, 2019, 5:07 p.m.