BookmarkSubscribeRSS Feed
cpulala
Obsidian | Level 7

Hi I wanted to report p-value for this table

 

The column variables are ordinal variables  (4 levels)

The row variables are categorical variables (4 levels)

Table cells are reported as proportions for each categorical variable by column. The total number of observations for each column is different.

                   group1  group2  group3  group4         p-value

cat_var                                                                     P

    level 1       %           %           %          %             P1

    level 2       %           %           %          %             P2

    level 3       %           %           %          %             P3

    level 4       %           %           %          %             P4

    

My questions are

(1) which test to use for the P-value (row variable by column variable) in orange color

(2) which test for the p-value in green color, to have the p-value for each level by column variable (cell value reported as proportion)

 

Thanks!

4 REPLIES 4
PaigeMiller
Diamond | Level 26

Please state the hyptheses you are trying to test and get p-values for.

--
Paige Miller
cpulala
Obsidian | Level 7

Thanks for the note.

 

I wanted to test

(1) whether cat_var is statistically significant between each comparison group.

(2) whether the value (proportion) for each level of cat_var is different from each other.

 

For question(1), usually chi-square by using proc freq for 'categorical var by categorical var' is used, however, I am not sure which test to use for ordinal variable by categorical variable.

 

Thanks.

Rick_SAS
SAS Super FREQ

What are you testing for? Association? Trend? Are you trying to model cat_var by group_var (or vice versa)?

 

I suggest you use counts instead of proportions and analyze the data with PROC FREQ. The documentation has many examples that you can read and see if any of them are similar to what you want to analyze. You can also find many many SAS proceedings papers that describe the many statistical tests in PROC FREQ. Search for 

    sas "proc freq" test site:sas.com/proceedings

cpulala
Obsidian | Level 7

Thanks. Please see the previous response on the hypothesis.

 

I understood the proc freq for categorical variables, but not sure which test to use when ordinal variables were involved. I can deem the ordinal variable as categorical, but only when there is no specific way for the oridinal variable by categorical variable (over 2 levels).

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 4100 views
  • 0 likes
  • 3 in conversation