Procedure features: |
VAR statement |
WITH statement |
|
Data sets: |
|
This example compares
one variable from the base data set with two variables
in the comparison data set.
|
libname proclib 'SAS-library'; |
|
options nodate pageno=1 linesize=80 pagesize=40; |
|
proc compare base=proclib.one compare=proclib.two nosummary; |
|
var gr1 gr1;
with gr1 gr2;
title 'Comparison of One Variable with Two Variables';
run; |
|
Comparison of One Variable with Two Variables 1
COMPARE Procedure
Comparison of PROCLIB.ONE with PROCLIB.TWO
(Method=EXACT)
NOTE: Data set PROCLIB.TWO contains 1 observations not in PROCLIB.ONE.
NOTE: Values of the following 2 variables compare unequal: gr1^=gr1 gr1^=gr2
Value Comparison Results for Variables
__________________________________________________________
|| Base Compare
Obs || gr1 gr1 Diff. % Diff
________ || _________ _________ _________ _________
||
1 || 85.0 84.00 -1.0000 -1.1765
3 || 78.0 79.00 1.0000 1.2821
__________________________________________________________
__________________________________________________________
|| Base Compare
Obs || gr1 gr2 Diff. % Diff
________ || _________ _________ _________ _________
||
1 || 85.0 87.0000 2.0000 2.3529
3 || 78.0 73.0000 -5.0000 -6.4103
4 || 87.0 74.0000 -13.0000 -14.9425
__________________________________________________________
| |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.