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?
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.
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.
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.
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.
Thank you @FreelanceReinh, I think your last 2 might be an option for me yes.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.