Yes, Pearson Correlation ist an important step. But you should also do scatter-plot, as the relation could be non-linear.
Cheers, Markus
Hi Pixydust,
depends on the image you see. Maybe you'll find another hypothesis for the relation.
Would you like to share the plot?
Cheers
Markus
My code:
proc sgplot data=Iowa;
reg x=Poultry_Farms y=Air_Pollution/ clm cli;
run;
Should I even do a scatter plot since one variable is continuous and one is discrete? I think I'm confusing myself. My goal is to see if there is a correlation between the two.
Hello @Pixydust12 ,
That's the plot I asked for. Its no problem to mix contineous and discrete value. To me it looks as there is no relationship. Correspondingly the correlation coefficient should be close to zero.
Cheers Markus
Hello @Pixydust12 ,
I would assume the number of poultry farms to be rather stable. So taking the 5 years mean for the air polution should be ok. But to be on the safe side (if there is a safe side in statistics), I would also do the plot for the correspondig 1year data of air polution.
Cheers Markus
Hello @Pixydust12 ,
The relationship might be non-linear in any direction of course.
Air pollution levels can be greater in counties near poultry farms.
Air pollution levels can be smaller / lower in counties near poultry farms.
The plot will tell you (if not looking like a random scatter), but the plot should support an hypothesis test or a small model that "proves" this.
Koen
Hello,
You need one dataset with 3 columns (and not two datasets --> merge them by county).
As said by @MarkusWeick , you first need to graph / plot your data to get better insights on the analysis that might be appropriate.
Pearson correlation can be interesting but it is only measuring linear correlation indeed.
You can try a simple linear regression as well, but maybe a spline fits the data better?
Thanks,
Koen
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.