BookmarkSubscribeRSS Feed
michelle05
Fluorite | Level 6

Question reads:

Two methods of determining carotid stenosis (narrowing of the carotid artery which supplies blood to the brain) are being compared.  Method one is an invasive method that is believe to be very accurate.  Method two is a noninvasive (MRI) method.  One hundred patient were evaluated by these two methods with these results:

 

Method One                     Method Two                           Count

Occuled                              Occuled                                  15

Occuled                              Non-occuled                            8

Non-occuled                        Occuled                                 10

Non-occuled                         Non-occuled                         67

11 REPLIES 11
Jagadishkatam
Amethyst | Level 16
Could you please let us know what you want output with this data.
Thanks,
Jag
michelle05
Fluorite | Level 6

Sorry I don't understand your question.

Jagadishkatam
Amethyst | Level 16

You have posted the sample data but did not post what you are expecting the output as, the two methods data along with the count is there with this data want you want to do is not clear to me

Thanks,
Jag
michelle05
Fluorite | Level 6

I apologize it says compute coefficient Kappa.

Kurt_Bremser
Super User

@michelle05 wrote:

Question reads:

Two methods of determining carotid stenosis (narrowing of the carotid artery which supplies blood to the brain) are being compared.  Method one is an invasive method that is believe to be very accurate.  Method two is a noninvasive (MRI) method.  One hundred patient were evaluated by these two methods with these results:

 

Method One                     Method Two                           Count

Occuled                              Occuled                                  15

Occuled                              Non-occuled                            8

Non-occuled                        Occuled                                 10

Non-occuled                         Non-occuled                         67


And what is the question here?

michelle05
Fluorite | Level 6

I'm sorry it says Compute Coefficient Kappa.

KachiM
Rhodochrosite | Level 12

It is a 2 by 2 table . Use Proc Freq to get the estimate of Kappa Coefficient.

 

                           
data have;
input carotid1 :$11. carotid2 :$11. count;
datalines;
Occuled      Occuled      15
Occuled      Non_Occuled   8
Non_Occuled  Occuled      10
Non_Occuled  Non_Occuled  67
;
run;

proc freq data=have;
  table Carotid1*carotid2;
  exact mcnem;
  weight count;
run;
michelle05
Fluorite | Level 6

I did something similar like this earlier and I kept getting 8 errors.  When I entered this code in,  I got 7 errors.  I am stuck.

KachiM
Rhodochrosite | Level 12

Show your Log.

 

I am getting the output as:

 

The FREQ Procedure
Frequency
Percent
Row Pct
Col Pct
	
Table of carotid1 by carotid2
carotid1 	carotid2
Non_Occuled 	Occuled 	Total
Non_Occuled 	
67
67.00
87.01
89.33
	
10
10.00
12.99
40.00
	
77
77.00
 
 
Occuled 	
8
8.00
34.78
10.67
	
15
15.00
65.22
60.00
	
23
23.00
 
 
Total 	
75
75.00
	
25
25.00
	
100
100.00

Statistics for Table of carotid1 by carotid2
McNemar's Test
Chi-Square 	DF 	Pr > ChiSq 	Exact
Pr >= ChiSq
0.2222 	1 	0.6374 	0.8145
Simple Kappa Coefficient
Estimate 	Standard
Error 	95% Confidence Limits
0.5068 	0.1008 	0.3092 	0.7045

Sample Size = 100
michelle05
Fluorite | Level 6
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 ***PROGRAM TO CALCULATE KAPPA FROM RAW DATA
72 DATA HAVE;
73 INPUT METHOD1 $ METHOD2 $ COUNT;
_____
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
74 DATALINES;
_________
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
75 OCCULED OCCULED 15
_______
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
76 OCCULED NON_OCCULED 8
77 NON_OCCULED OCCULED 10
78 NON_OCCULED NON_OCCULED 67
79 ;
 
80 RUN;
81 PROC FREQ DATA = HAVE;
ERROR: File WORK.HAVE.DATA does not exist.
82 TABLE METHOD1*METHOD2;
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
83 WEIGHT COUNT;
ERROR: No data set open to look up variables.
84 RUN;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 296.37k
OS Memory 32164.00k
Timestamp 09/15/2019 05:04:47 PM
Step Count 438 Switch Count 0
Page Faults 0
Page Reclaims 16
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
85
86
87 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
98
michelle05
Fluorite | Level 6

Thank you!  It was me!  I have the output this time.  Sorry!  Again, thank you for your time and your help.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 1101 views
  • 0 likes
  • 4 in conversation