Not applicable
Posts: 1

Proc corr n=2

Hallo everyone.

We are four students doing a paper in the course Business Analytics. We are doing a Conjoint analysis using SAS, and we have 16 profiles and two holdout profiles.

We want to use proc corr in order to see how the rating correlate with the predicted values for the holdout cases. But when we do this we get that the correlation is 1.000 and -1.000.

But when we include more of our active profiles, so that N increases we get output that look like we would think it should. Can it be, than N has to be bigger than 2 in order to use proc corr???

the code look like the following:

ods output KendallCorr=k PearsonCorr=p;

ods listing close;

Proc corr nosimple noprob kendall pearson data = results1;

Title3 'Holdout validation Results';

var Ppreference;

with Tpreference;

by notsorted participant;

run;

ods listing;

Anne Duedahl

Frequent Contributor
Posts: 120

Re: Proc corr n=2

Hi,

Kindly check the detailed information about the procedure CORR which computes Karl Pearson's Correlation Coefficients at :

https://support.sas.com/documentation/cdl/en/procstat/63104/PDF/default/procstat.pdf

Regards

Uma Shanker Saini

Super User
Posts: 23,754

Re: Proc corr n=2

I think you need to take a look at the definition of correlation rather than the SAS implementation first.

If n=2 what happens to the formula?

Correlation

You can also try the correlation formula in Excel and see what it gives you if you input 2 numbers (1 or -1 depending on the numbers).

Is your full dataset 18? If so, that's a very small sample size .

In general, the smaller the sample size the less reliable the results for all statistical indicators.

E.G. If you happen to flip heads twice in a row, you can't assume that the probability of getting heads is 1.

Discussion stats
• 2 replies
• 256 views
• 1 like
• 3 in conversation