BookmarkSubscribeRSS Feed
andraro
Calcite | Level 5

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.

3 REPLIES 3
PGStats
Opal | Level 21

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.

PG
andraro
Calcite | Level 5

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. 

PGStats
Opal | Level 21

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.

PG

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 478 views
  • 1 like
  • 2 in conversation