/* This code will study the correlation */ /* between LotSize and WorkHrs for the Toluca data set */ /* The data given here are the lot size and work hours*/ /* from the example we studied in class */ /* I am calling the data set "toluca". */ /* The first variable is LotSize. */ /* The second variable is WorkHrs. */ data toluca; input LotSize WorkHrs; cards; 80 399 30 121 50 221 90 376 70 361 60 224 120 546 80 352 100 353 50 157 40 160 70 252 90 389 20 113 110 435 100 420 30 212 50 268 90 377 110 421 30 273 90 468 40 244 80 342 70 323 ; run; /* We can find the correlation coefficient in SAS using PROC CORR: */ /* The option FISHER will provide a 95% CI for rho using the Fisher z-transformation. */ PROC CORR DATA = toluca FISHER; VAR WorkHrs LotSize; run; /* So we see from the output that r is 0.90638.*/ /* The 95% CI for rho is (0.7895, 0.9567). */