- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I'm looking at values from the right and left side of the body and using PROC CORR to test for a correlation between the two sides. I have a zero-inflated data set (the zeroes are meaningful to me and thus cannot be removed), and while doing PROC CORR, I'm getting matrices back without estimates because the standard error is zero. Is there a way around this/how should this be reported?
I'm also getting scatter plots back with curved fit lines. Can I fix this somehow? Or is this just how it is because of my data? Examples of both are below, along with the code that is being used.
Thanks in advance.
PROC CORR Data=coimbra_big PLOTS=SCATTER(NVAR=all);
VAR EXTLZ2CA EXTRZ2CA;
run;
The SAS System |
EXTLZ1ER EXTRZ1ER |
181 | 0 | 0 | 0 | 0 | 0 |
205 | 0.01463 | 0.15587 | 3.00000 | 0 | 2.00000 |
|
| ||||||
|
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When a variable has no variability, such as all the values being exactly the same, which appears to be the case with one of your variables then the standard deviation is zero. Period. Notice that you summary shows that mean, max, and minimum are also all 0 for the first variable.
What happens in this case for correlation is that the constant variable has no correlation because there is no change when the other variable changes values.
I suggest investigating why that variable only has a value of zero will likely gain more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Report those correlations as missing: there is no way they can be estimated from your data. The curved lines on the scatter graphs are prediction ellipses. To get rid of them, specify PLOTS=SCATTER(ELLIPSE=NONE) on the proc corr statement.