The SAS Output Delivery System and reporting techniques

SAS ... spss

Reply
N/A
Posts: 0

SAS ... spss

Hi Folks,

I have been going through help file section after help file section to find what I think should be something obvious/easy to do but cannot find what I am looking for.

Here is what I am trying to do:

a frequency distribution of variable_x in/of sas_table_y.

IN spss I could do this by opening the file, finding the field name I want and choosing from the menu Analysis,Frequencies{x},OK ...or... writing syntax like:

Frequencies x.
execute.

In SPSS I can lookup in the help and find the command and all of it's parameters.

I was trying to do this today in SAS and I first looked under report. When I try to 'build a report' in SAS, I select the dataset and then it automatically gives me all of the fields(and doesn't let me drop any) (I only have 7 fields, so it's like looking at the raw table.

I tried looking in the sas help under proc freq, but it just tells me to give it a table name - I just want to see a frequency dist of one field not all. Where can I find a simple readable doc that lists all of the parameters for proc freq?


Sergio the dimwit
N/A
Posts: 0

Re: SAS ... spss

Hi Sergio,

The SAS help has all the resources you need, but sometimes I find it easier to navigate on a more text-link-based page, as opposed to the Java-dependent SAS OnlineDoc.

Check out this resource: http://www.csc.fi/cschelp/sovellukset/stat/sas/sasdoc/sashtml/main.htm and click on "SAS Procedures Guide" under Base SAS. If all you're looking for is a simple frequency, I'd still suggest Proc Freq, as you had previously attempted.

proc freq data = table_y;
tables x;
run;

"Tables" in proc freq works kind of like "Var" in proc print, if that makes it easier to grasp. If you had to do a two-way frequency between x and z, the line would read "tables x*z", for instance.

You can click through the various links within to see the options of proc freq/tables/output/etc so you have a better idea of how to tweak your code. The examples (once again, taken directly from the SAS OnlineDoc) are very good and helped me figure my way through many programming projects when I was a student.

Elayne
N/A
Posts: 0

Re: SAS ... spss

If you have it, I would also encourage you to check out Analyst. Look on the menu bar under Solutions, Analysis.

What I like about this is that it will create the code for you which you can then modify to fit your needs.

Nice little prototyping tool. You can learn more about in the online manual as well.
Ask a Question
Discussion stats
  • 2 replies
  • 128 views
  • 0 likes
  • 1 in conversation