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;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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