Principal component analysis (PCA) has been heavily used for both academic and practical purposes. This tutorial would help individuals who want to better utilize PCA as well as R scholars interested in Q analysis. Many statistical commercial packages can handle PCA, but one may reach a deeper understanding by running PCA code for oneself. Cranking out results using PCA features on one of the commercial statistical packages is easy, just importing data and clicking a few buttons. For a deep understanding of PCA, however, an individual needs to see what happens when running code. Many scholars may have a basic knowledge of a popular programming language like Python. But PCA code in Python is not neatly compiled in one place. A user must gather Python code that is scattered around the Internet, tweak it for compatibility, and fill any remaining gaps. Also, commercial statistical packages, which have been geared toward R analysis, cannot be used for rotation for theoretical or exploratory analysis in Q studies beyond varimax. This tutorial offered all Python code needed for PCA while comparing its results with Statistical Package for the Social Science (SPSS) output. This tutorial also covered the theoretical or exploratory rotation of factor axes, which is a must for Q analysis.
Keywords : PCA, Principal Component Analysis, linear algebra, graphs, Python code, varimax rotation, and R and Q analysis