![]() | ![]() | ![]() | ![]() | ![]() |
| Contents: | Purpose / Requirements / Usage / Details / Missing Values / See Also / References |
%inc "<location of your file containing the COMPCORR macro>";
Following this statement, you may call the %COMPCORR macro. See the Results tab for an example.
The parameters of the macro are described below. All parameters are required and must be specified.
The method is not appropriate for two comparing two dependent correlations. Consequently, this program will not compare correlations which involve a shared variable from a shared data set. That is, if SET1=SET2 and if the two correlation coefficients share at least one of the variables, then the test isn't output, since the correlations aren't independent. User should be aware of other possible violations in independence.
Small p-values indicate strong evidence that the correlations estimate different rho values.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
data one; * generate artificial dataset ;
do i=1 to 100;
x1=normal(529);
x2=normal(529);
x3=normal(529);
x4=normal(529);
x5=normal(529);
x6=normal(529);
output;
end;
run;
PROC CORR outp=two DATA=one;
VAR x1-x3 ;
RUN;
PROC CORR outp=three DATA=one;
VAR x4-x6 ;
RUN;
/* Define the COMPCORR and CORRCI macros */
%inc "<location of your file containing the COMPCORR macro>";
%compcorr(set1=one, corr1=two, set2=one, corr2=three, out=four);
proc print data=four noobs;
var var1_1 var1_2 corr1 n1 var2_1 var2_2 corr2 n2 d sigd z0 pval;
run;
var1_1 var1_2 corr1 n1 var2_1 var2_2 corr2 n2 d sigd z0 pval x1 x2 -0.04267 100 x4 x5 0.022997 100 -0.06570 0.14359 -0.45753 0.64729 x1 x2 -0.04267 100 x4 x6 0.049712 100 -0.09245 0.14359 -0.64383 0.51969 x1 x2 -0.04267 100 x5 x6 0.064155 100 -0.10694 0.14359 -0.74474 0.45643 x1 x3 -0.03804 100 x4 x5 0.022997 100 -0.06106 0.14359 -0.42522 0.67067 x1 x3 -0.03804 100 x4 x6 0.049712 100 -0.08781 0.14359 -0.61153 0.54085 x1 x3 -0.03804 100 x5 x6 0.064155 100 -0.10230 0.14359 -0.71244 0.47619 x2 x3 0.18332 100 x4 x5 0.022997 100 0.16241 0.14359 1.13107 0.25803 x2 x3 0.18332 100 x4 x6 0.049712 100 0.13566 0.14359 0.94477 0.34478 x2 x3 0.18332 100 x5 x6 0.064155 100 0.12117 0.14359 0.84385 0.39875
Right-click on the link below and select Save to save
the %COMPCORR macro definition
to a file. It is recommended that you name the file
compcorr.sas.
Download and save compcorr.sas
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> CORR Analytics ==> Nonparametric Analysis Analytics ==> Descriptive Statistics |
| Date Modified: | 2007-08-11 03:03:08 |
| Date Created: | 2005-01-13 15:03:04 |
| Product Family | Product | Host | SAS Release | |
| Starting | Ending | |||
| SAS System | Base SAS | All | 6.12 | 9 TS M0 |
| SAS System | SAS/STAT | All | 6.12 | 9 TS M0 |






