Setting up principal component analysis