Code to study correlation of several variables