turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Importing Data for a Chi Square Test

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-10-2017 11:18 AM

So for a problem, I am comparing Positron Emission Tomography (PET) and Computed Tomography (CT) to Magnetic Resonance Imaging (MRI). I am ultimately asked if there is a difference in accuracy between PETCT and MRI, which one would be better and what the degree of association between the two methods is. Because of the last part about association, I know I need to run a Chi-Square Test. But first, I can't get my data imported correctly.

There are 50 subjects and the data looks like this:

Subject MRI PET-CT

1 Correct Correct

2 Correct Correct

3 Correct Correct

4 Correct Correct

5 Correct Correct

6 Correct Correct

7 Correct Correct

8 Correct Correct

9 Correct Correct

10 Correct Correct

11 Correct Correct

12 Correct Correct

13 Correct Correct

14 Correct Correct

15 Correct Correct

16 Correct Correct

17 Correct Correct

18 Correct Correct

19 Correct Correct

20 Correct Correct

21 Correct Correct

22 Correct Correct

23 Correct Correct

24 Correct Correct

25 Correct Correct

26 Correct Correct

27 Correct Correct

28 Correct Correct

29 Correct Correct

30 Correct Correct

31 Correct Correct

32 Correct Correct

33 Correct Correct

34 Correct Correct

35 Correct Correct

36 Correct Correct

37 Correct Incorrect

38 Incorrect Correct

39 Incorrect Correct

40 Incorrect Correct

41 Incorrect Correct

42 Incorrect Correct

43 Incorrect Correct

44 Incorrect Correct

45 Incorrect Correct

46 Incorrect Correct

47 Incorrect Correct

48 Incorrect Correct

49 Incorrect Incorrect

50 Incorrect Incorrect

I don't know how to get the data into a table that will allow me the run a chi-square. Any tips?

Accepted Solutions

Solution

11-10-2017
11:45 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to trash

11-10-2017 11:23 AM

/* UNTESTED CODE */ proc freq data=have; tables MRI*PETCT/chisq; run;

--

Paige Miller

Paige Miller

All Replies

Solution

11-10-2017
11:45 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to trash

11-10-2017 11:23 AM

/* UNTESTED CODE */ proc freq data=have; tables MRI*PETCT/chisq; run;

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to trash

11-10-2017 11:40 AM

In addition to Chi Squared you're likely going to want to calculate the specificity and sensitivity.