It summarizes the moment when the datasets were created and modified, the number of variables, the number of observations, and the dataset labels. The Data Set Summary shows you which two datasets were taken into account and compares their meta-data.
( Later we will discuss how to specify matching observations) Data Set Summary Then, it compares the values of the second row in both datasets, etc. In other words, it compares the values in the first row of the base dataset with the values in the first row of the comparison dataset. Because we didn’t specify how to match observations, SAS matches observations by rows. Remember, PROC COMPARE compares the values of matching observations. We will discuss each section in further detail. PROC COMPARE creates a report with six sections: For this purpose, we create two datasets work.my_first_dataset and work.my_second_dataset. This is how the steps above look like in SAS code: proc compare base= base-datasetīelow, we give an example of how to use PROC COMPARE and explain the information it generates. Finish and execute the procedure with the RUN statement.Use the COMPARE=-option to specify the name of the second dataset.Use the BASE=-option to specify the name of the first dataset.
How to Compare Variables in the Same Dataset?.Listing of Common Variables with Differing Attributes.