Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
monsterpie
Obsidian | Level 7

Hi everyone, 

 

I have 2 categorical variables: Var1 - 3 levels, Var2- 5 levels (i.e., table is bigger than 2x2). Since I have multiple cells <5, I have run a Fisher's exact test with Monte Carlo estimation for the p value (code and output is below). I understand that if I want to determine which specific cells are not associated, I need to perform a post hoc test, but I'm not sure which test to perform, or how to do this in SAS? From doing some research online, it seems like a Bonferroni correction might be a suitable choice? Any help would be very much appreciated. 

 

CODE:

proc freq data=winter_t1;
title "Fisher's exact with exact option";
tables var1*var2;
exact fisher/mc;
run;

 

OUTPUT:

Statistics for Table of Var1 by Var2

 

Statistic

DF

Value

Prob

Chi-Square

8

434.4255

<.0001

Likelihood Ratio Chi-Square

8

186.6401

<.0001

Mantel-Haenszel Chi-Square

1

92.1028

<.0001

Phi Coefficient

 

0.7704

 

Contingency Coefficient

 

0.6103

 

Cramer's V

 

0.5447

 

WARNING: 27% of the cells have expected counts less
than 5. Chi-Square may not be a valid test.

 

Fisher's Exact Test

Table Probability (P)

<.0001

 

Monte Carlo Estimate for the Exact Test

Pr <= P

<.0001

99% Lower Conf Limit

<.0001

99% Upper Conf Limit

0.0005

 

 

Number of Samples

10000

Initial Seed

814770001

 

Sample Size = 732

1 REPLY 1
SAS_Rob
SAS Employee

You might try one of the suggested approaches in the usage note linked below.

https://support.sas.com/kb/22/565.html 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 2122 views
  • 3 likes
  • 2 in conversation