*! version 1.1 24sep2014 Philip M Jones pjones8@uwo.ca
help csti

Title

csti -- Wrapper for -csi- command in order to use total numbers rather than individual cell counts

Syntax

csti #n1/#N1 #n2/#N2 [, csi_options]

where,

n1 = number of events in the 'exposed' (intervention) group

N1 = total number of subjects in the 'exposed' (intervention) group

n2 = number of events in the 'unexposed' (control) group

N2 = total number of subjects in the 'unexposed' (control) group

Note the slash ("/") is mandatory and the command will fail if it is not entered.

csi_options
or report odds ratio

woolf use Woolf approximation to calculate SE and CI of the odds ratio

tb calculate test-based confidence intervals

exact calculate Fisher's exact p

level(#) set confidence level; default is level(95)

Description

csti Ñ In many journals, including medical journals, binary outcomes (such as mortality) are typically displayed in a Table as the number of events over the number of patients or subjects in the group, i.e. "n/N".
If one wants to compute a risk ratio and chi-squared (or Fisher's exact test) P value, Stata's csi command can be used.

However, to use csi, it is first necessary to calculate, within each group, the difference between the total number of subjects and the number of events.
This is because csi expects the data to be entered as individual cell counts rather than "events" and "total subjects".

While this is not particularly difficult, it is prone to simple math errors, and requires more effort than simply entering the number of events and the denominator within each group.
This is especially true when performing this task for multiple outcomes.

Also, the csi command requires you to enter the cell counts in a slightly awkward way, as it expects the events for both groups to be entered first, followed by the non-event counts.
When going through a journal article, for instance to verify RRs and P values, it seems more natural to enter both counts for one group first, followed by the counts for the other group.

For example, if 23/130 patients died in an intervention group while 13/127 patients died in a control group, Stata's csi syntax would be:

. csi 23 13 107 114

csti allows you to enter data more naturally. The same outcomes as above, when using csti, are entered like this:

. csti 23/130 13/127

Details

Because this is a wrapper command for csi, all csi_options are passed along and will work normally.

Options and Saved results

The csi command's options are described in csi's help file. All "r" returned values are retained from the csi command.

Examples

1. A two-group randomized trial showed that 109/2012 patients developed kidney failure with Treatment A while 57/2015 patients developed kidney failure with Treatment B.

. csti 109/2012 57/2015

2. The same numbers as Example #1, but now you want the P value to be from Fisher's exact test (instead of from the chi-squared test), and you also want to see the odds ratio as well as the risk ratio:

. csti 109/2012 57/2015, exact or

3. If you were using Stata's csi command, you would have entered the following command to obtain exactly the same results as Example #2:

. csi 109 57 1903 1958, exact or

Author Information:

Philip M Jones, MD, MSc (Clinical Trials), FRCPC

Department of Anesthesiology & Perioperative Medicine

Department of Epidemiology & Biostatistics

Faculty of Medicine & Dentistry, University of Western Ontario

London, Ontario, Canada

pjones8@uwo.ca

Change Log:

17sep2014 - Version 1.0

Initial version published.

01oct2014 - Version 1.1

Changed syntax based on very helpful feedback from Sergiy Radyakin.
Added some (minor) error detection.

Also see

Manual: [ST] epitab

Help: csi