BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Further to my previous question:

I have data with movement of people between states e.g.

NAME FROM TO
John Maine Maryland
Steven New York Ohio
David Ohio Chicago

I would like to produce a SAS dataset or excel table which totals the number of people who moved between each state. For example I want to be able to see how many people moved from Ohio to NY and I also need to be able to read off the number of people who moved from NY to Ohio on the same chart.

i.e. read Ohio on the x-axis and NY on the y-axis to see how many moved from Ohio to NY

and read NY on the x-axis and Ohio on the y-axis for NY to Ohio moves

Is this possible? If you use PROC FREQ is it possible to get the data into a file rather than just on the HTML output?

mu
1 REPLY 1
deleted_user
Not applicable
If you are using ODS to output then just use the phtml device and output to a file with .xls as a extension. Excel will open the file, even though it is written in html;.

ods listing close;
ods phtml file='c:\migration.xls';
proc freq data=migration;
tables to*from;
run;
ods phtml close;
ods listing;
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 959 views
  • 0 likes
  • 1 in conversation