Proc corr n=2

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;


ods listing;

Thank you in advance.

Anne Duedahl

Frequent Contributor
Posts: 116

Re: Proc corr n=2


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


Uma Shanker Saini

Super User
Posts: 17,912

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?


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.

Ask a Question
Discussion stats
  • 2 replies
  • 1 like
  • 3 in conversation