My Profile Photo

ML ideabook


A notebook for Coursera Machine Learning course ideas


Pearson correlation test

This week is much easier, no post-hoc test is needed, thus the code is much simpler.

ods html close;
ods html;
libname worklib 'e:\Course\'; 
proc import
	datafile="E:\SPM\Coursera_datasets\nesarc_pds.csv"
	out=worklib.nesarc_pds;
	delimiter=',';
run;
data worklib.working;
	set worklib.nesarc_pds;
run;
proc sort; 	by idnum;

proc corr;
	var S1Q24FT S1Q24LB;
run;

Here’s the output. Two variables are tested and statistically significant, with the correlation coefficient 0.65291, moderately strong positive correlation.