OpenIntro Example: Stent Studies with Quadstat, R and SAS

The OpenIntro Textbook uses the stent30 and stent365 datasets. From these datasets the text mentions that the proportion of volunteers with stents who saw a stroke event after a year was larger than the number of volunteers who did not have stent and did not experience a stroke.

We can come to the same conclusion as the textbook using Quadstat. Open up a browser window to load the Contingency Table web application and select the stent30 dataset from the dropdown select box.

Quadstat Contingency Table Screenshot

Also, we want to use all the data in the dataset for this operation so we checkmark "Select entire dataset".

Quadstat Contingency Table Screenshot

Then, click "Submit" with the mouse.

If you do not checkmark, "Select entire dataset," Quadstat will prompt you to select a dataset column before continuing.

Quadstat Contigency Table Screenshot 30

This is the same summary data presented in the OpenIntro textbook Advanced High School Statistics on page 9. We can repeat this process for the stent365 dataset.

Quadstat Contigency Table Screenshot 365
R Code

We must first import the dataset and then use the R summary command.

> summary(stent30);
group outcome
control :227 no event:405
treatment:224 stroke : 46
> summary(stent365);
group outcome
control :227 no event:378
treatment:224 stroke : 73

Here R presents us with totals so need to do some arithmetic to get the same values as the textbook.

SAS Code

We must first import the dataset and then use the SAS PROC TABULATE command.

proc tabulate data=STENT30;
class group outcome;
table group*outcome;
Quadstat Contingency Table Stent30 Screenshot From SAS
proc tabulate data=STENT365;
class group outcome;
table group*outcome;
Quadstat SAS PROC FREQ 365 screenshot