BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8


I have two variables:

Age

Charecteristic

        

                                                 Charecteristic (variable)

                                                      Tiny(value)

Age(formatted)                                Huge (value)

21-30                     

31-40

41-50

51-60

61-70

71-high

i want to make a 3 contingency tables like this(to see the relation and find chisq):

Age \Charecteristic        Y      N                                 

          Tiny                                                                                        

Age\Charecteristic           Y     N 

        Huge

                

Age\Charecteristic         Y    N

        Any   

Concerns:

How can we get a table with one value(for exTiny) when it has Tiny and Huge under that variable name

How can we get Y and N (There is no variable holding these values).Do i need to create a format???

Could anybody help me out please???

Thanks

3 REPLIES 3
robby_beum
Quartz | Level 8

Maybe I'm not understanding the question but this might help get you closer (not understanding the Y/N part):

 

proc freq data=your.indata;

   tables age*characteristic / list missing

   out=your.outdata;

   where characteristic='Tiny';

run;

robertrao
Quartz | Level 8

Hi Robby,

Thanks so much for the reply.

I am guessing.

Suppose 21-30 age group has 50 people............but in that 50 ........12 are Tiny and 20 are Huge

so when it is tiny it is

Y         N

12       20

when it is Huge it is:

Y         N

20       12

when it is Any it is:

Y         N

32       12

I think this gives a clear picture......

But Do we have to create the Y and N .if so how to do that too?//

Thanks for ur time

robertrao
Quartz | Level 8

Sorry it would be like this

When Tiny

Y         N

12       38

When Huge

Y       N

20     30

When Any

Y       N

32      18

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