Skip to content
Prev 67837 / 398506 Next

Pearson corelation and p-value for matrix

Dear Andy,

That's clearly much better -- and illustrates an effective strategy for
vectorizing (or "matricizing") a computation. I think I'll add this to my
list of programming examples. It might be a little dangerous to pass ...
through to cor(), since someone could specify type="spearman", for example.

Thanks,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
--------------------------------