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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1227 views
  • 0 likes
  • 2 in conversation