BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AK100
Pyrite | Level 9

Hello All,

 

Just a quick question. I have finished a SAS project, and I actually want to check or validate this project to make sure that the program does what it is supposed to do, producing a documented evidence of this?

 

Are there specific SAS ways to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

PROC COMPARE compares two datasets, so you need a base dataset with which to compare your result.

 

If the requirements exist only in your head, then your head is the only tool available for checking.

 

Testing software in an automated way always means that you have the necessary input and output data available to validate against.

View solution in original post

5 REPLIES 5
Kurt_Bremser
Super User

You need an example for the input data, and the expected result for exactly that input data. Then you can verify your results agains that. How you do that, depends on the type of the expected result. If it is a dataset, you can run PROC COMPARE, if it is a report, you most probably will have to visually check against the "wanted" report.

AK100
Pyrite | Level 9
Yeah a report is most likely to be checked visually. I'am more interested in checking a data-set in EG. So you are saying to use PROC COMPARE you always need a standard 'wanted' report? But where do you get your 'wanted' report from, in my case I don't have a 'wanted' data-set. The data-set I want to validate is my 'wanted' data-set.
Kurt_Bremser
Super User

PROC COMPARE compares two datasets, so you need a base dataset with which to compare your result.

 

If the requirements exist only in your head, then your head is the only tool available for checking.

 

Testing software in an automated way always means that you have the necessary input and output data available to validate against.

FreelanceReinh
Jade | Level 19

Hello @AK100,

 

If the dataset to be checked is the basis of important statistical analyses (of any kind) or similar further processing, it should be validated to a high standard -- considering the risks that a faulty dataset would entail. In the pharmaceutical industry, for example, it is quite common to double-program such analysis datasets, i.e., a second programmer creates the dataset independently (using the same specifications and raw data) and PROC COMPARE is applied to this and the first programmer's dataset.

 

If involving a second programmer is not an option in your business, you can try and create a second dataset for comparison using different programming techniques, e.g., PROC SQL (or other procedures) vs. DATA step.

 

Weaker, but less time-consuming validation techniques include plausibility and consistency checks of important variables using PROC FREQ, PROC MEANS, etc. (for example, comparing the results to those obtainable from raw data). Needless to say, basic validation efforts such as checks of the SAS log (no errors, warnings or suspicious notes/info messages from msglevel=I), the structure of the result dataset (PROC CONTENTS) and its number of observations should always be made.

AK100
Pyrite | Level 9

Thank you @FreelanceReinh, I think your last 2 might be an option for me yes.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 806 views
  • 2 likes
  • 3 in conversation