turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Proc corr n=2

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-30-2013 04:24 AM

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;

Thank you in advance.

Anne Duedahl

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-30-2013 04:52 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-30-2013 11:07 AM

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.