BookmarkSubscribeRSS Feed
Ujjawal
Quartz | Level 8

I want to check categorical variable distribution over a period of time. For example, the distribution of variable district code has changed over a period of time ( Time 0 - Period of model Development, time1 -  after one year).

I perform the following analysis for numeric variables.

Step 1 -  Rank variable into 10 group (decile)

Step 2- (% of records based on variable in Scoring Sample (A) - % of records based on variable in Training Sample (B)) * In(A/ B)

Step 3 -  Then sum up the scores in step2 on 10 groups


I'm little bit skeptical about the same analysis for categorical variables.  I guess chi square analysis isn't correct technique to check it. Am i correct? What's the correct way?

6 REPLIES 6
Reeza
Super User

Take a look at the the options in proc freq, there's a test for trends over time.

Ujjawal
Quartz | Level 8

Which test?

Ksharp
Super User

This categorical variable is nominal or ordered ?

and how many levels does this variable have ?

If two level , you could try  TRAND analysis.

tables var * time / trend cl ;

Otherwise , try MEASURE analysis.

tables var* Dose / measures cl;

Xia Keshan

Reeza
Super User

TREND test

Ksharp
Super User

Trend test is only for 2*N matrix , if I was right . while MEASURE(Association test) is for N*M matrix.

Reeza
Super User

OP mentioned 2*N - Time before and Time after measurements.

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