# Find most representative variable using PCA in Matlab

I have a dataset with 400 variables and have to find the most representative variable by using PCA in Matlab.

I normalized the data X and used:

[coeff,score,latent,tsquared,explained,mu] = pca(X);


The first 3 PC make up about 60% of the variance.

I know that the columns in coeff represent the PCs and the rows in coeff represent the variables.

However, I fail to understand how I can now find the most representative variable.

The whole task is odd to me since PCA is used for dimension reduction.

Since "explained" shows the percentage of each PC's variance and the columns of coeff represent the PC I tried the following:

    %Weight PC of coeffs with var% and calc sum for each variable
WeightedCoeff=coeff*explained/100;
%find maximum
MaxVar=max(WeightedCoeff);
%find position of maximum
InMaxVariable=find(WeightedCoeff==MaxVar);


As a result, I would get the variable at column 194 as the most representative one. (Which could be true since this variable correlates positively for the first 10 PCs ~85% of variance).

Is this approach right?

• Because "representative" has no standard statistical definition and because as commonly understood it's not related to variance at all, please explain what you mean by "most representative." – whuber Aug 2 '19 at 18:26
• Thanks for your reply! I mean the variable that contributes the most to the variance – M08 Aug 2 '19 at 18:51