Programming the statistical procedures from SAS

Proc Freq help please-sas9.2

Reply
Super Contributor
Posts: 1,040

Proc Freq help please-sas9.2


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

Contributor
Posts: 73

Re: Proc Freq help please-sas9.2

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;

Super Contributor
Posts: 1,040

Re: Proc Freq help please-sas9.2

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

Super Contributor
Posts: 1,040

Re: Proc Freq help please-sas9.2

Sorry it would be like this

When Tiny

Y         N

12       38

When Huge

Y       N

20     30

When Any

Y       N

32      18

Ask a Question
Discussion stats
  • 3 replies
  • 156 views
  • 0 likes
  • 2 in conversation