Importing Data for a Chi Square Test

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

Importing Data for a Chi Square Test

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
Respected Advisor
Posts: 2,516

Re: Importing Data for a Chi Square Test

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

View solution in original post


All Replies
Solution
‎11-10-2017 11:45 AM
Respected Advisor
Posts: 2,516

Re: Importing Data for a Chi Square Test

/* UNTESTED CODE */
proc freq data=have;
     tables MRI*PETCT/chisq;
run;
--
Paige Miller
Super User
Posts: 22,525

Re: Importing Data for a Chi Square Test

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

 

https://en.wikipedia.org/wiki/Sensitivity_and_specificity

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 137 views
  • 1 like
  • 3 in conversation