Correlation using SAS


For example, we can run a correlation between two continuous variables, engine displacement (displ) and highway mpg (hwy).

proc corr data = mpg;
  var displ hwy;

SAS correlation


In the example above, we see that the correlation between displ and hwy is -0.7662. The negative sign means when engine displacement increases, the highway mpg usually decrees.



See Also:

Do the same test in R






Leave a Reply

Your email address will not be published. Required fields are marked *