Hi All,
I am new to SAS but I have been working with databases for a long time. I am struggling to understand what is the best way to work with SAS. I have variables that are dependent on time and from my understanding of database structuring is that there should be a column with the time step. Although this means that all the characteristics of the item will be duplicated many times which creates a large database?
As in SAS there are Arrays (which are just a grouping of variables) this makes the database more compact but what about the runtime is SAS not more efficient in doing line by line instead of a do loop?
I hope that my explanation is clear and that someone can help me in my dilemma.
Thanks to all for helping out.
A good tradeoff is to use two tables. One for item characteristics, the other for the time series, with an itemID key to link the two tables.
Going wide (arrays) will prove cumbersome in all aspects of data management and analysis.
Indeed one of the disadvantages of using arrays is the data handling.
How do you handle the fact that you need the characteristics to do the calculation of the time series.
When required by a given procedure: create views that join item characteristics to time series. A view generates the expanded dataset only when it is read, the whole data never has to be stored anywhere.
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.