SAS Tutorial | How to Restructure Your Data Using Arrays and DO Loops
Do you get data that are “short and wide”? Such data sets have one observation per subject and multiple time points and variables within one row. Jennifer Waller, Professor at Augusta University, prefers “long and skinny” data sets. In this SAS How-To tutorial, Jennifer shows you how to restructure data sets by setting up arrays and then using DO loops on those arrays. Download Data Files Jennifer uses data found on this site: https://covidtracking.com Content Outline 0:00 – Welcome 1:04 – Why Jennifer likes a long and skinny dataset 2:31 – How to set up arrays and use DO loops on the arrays 7:34 – How to output each iteration of this DO loop (OUTPUT statement is key) Learn more about SAS Software ◉ SAS Global Forum paper: A Beginners Guide to Using Arrays and DO Loops – https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4419-2020.pdf ◉ Jennifer’s SAS Global Forum presentation – https://www.youtube.com/watch?v=eVKMbQw-wjU ◉ GitHub – https://github.com/sascommunities/sas-global-forum-2020/tree/master/papers/4419-2020-Waller ◉ ARRAY Statement – https://go.documentation.sas.com/?docsetId=lestmtsref&docsetTarget=p08do6szetrxe2n136ush727sbuo.htm&docsetVersion=9.4&locale=en ◉ DO Statement – https://go.documentation.sas.com/?docsetId=lestmtsref&docsetVersion=9.4&docsetTarget=n0el0y2a02ab1ln1pks3gbac1en3.htm&locale=en ◉ The DO Loop blog – https://blogs.sas.com/content/iml/ ◉ Free SAS Online Training – https://www.sas.com/en_us/training/offers/free-training.html SUBSCRIBE TO THE SAS USERS YOUTUBE CHANNEL #SASUsers #LearnSAS https://www.youtube.com/SASUsers?sub_confirmation=1 ABOUT SAS SAS is a trusted analytics powerhouse for organizations seeking immediate value from their data. A deep bench of analytics solutions and broad industry knowledge keep our customers coming back and feeling confident. With SAS®, you can discover insights from your data and make sense of it all. Identify what’s working and fix what isn’t. Make more intelligent decisions. And drive relevant change. CONNECT WITH SAS SAS ► https://www.sas.com SAS Customer Support ► https://support.sas.com SAS Communities ► https://communities.sas.com SAS Analytics Explorers ► https://explorers.sas.com Facebook ► https://www.facebook.com/SASsoftware Twitter ► https://www.twitter.com/SASsoftware LinkedIn ► https://www.linkedin.com/company/sas Blogs ► https://blogs.sas.com RSS ► https://www.sas.com/rss
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.