For a prospective study of parameters affecting student's success in graduate school I am looking at a population of about 1500 med students. I have performed a cluster analysis (using Gower's universal similarity index and average linking) showing that students fall into 3 main groups (at ~ 0.2), each with several subgroups (at ~ 0.8). Clustering correlates poorly with study success or with any of the other parameters.

Normally, I'd perform a PCA in the hope of uncovering hidden variables that determine clustering. However, about 1/3 of the students fail the course at various time-points, so that there are a lot of missing data. To make matters worse, student performance on various exams (e.g., NBME Step1 and Step2) is only weakly correlated (r^2 ~ 0.3), so "filling" the table with calculated values would be questionable. Unfortunately, standard PCA reacts "poorly" to missing data.

I should add that the parameters are a mix of nominal, binary, ordinal and rational variables.

  • $\begingroup$ I'm not sure of the best method, but one idea is to use an imputation method to fill in the missing values, and then do PCA using the imputed values $\endgroup$ Jun 4, 2017 at 16:27
  • $\begingroup$ I wonder, "missing" value means a student did not make it until a certain grade? Should that really be considered a missing value? Maybe survival analysis would be able to make more of your data? $\endgroup$
    – g3o2
    Jun 6, 2017 at 21:03

2 Answers 2


In a similar situation but in different field we used correlation matrix shrinkage by Ledoit Wolf. The idea's to calculate the pair-wise covariance matrix using all available data. If instead you drop observations where one student's data is missing, there's nothing left of the dataset. So, we use the intersection of data for each pair of items, not for the entire set. Since s correlation matrix can end up being non PSD in this case, we apply the mentioned shrinkage method to it before plugging into PCA


You certainly can poorly implement PCA wrt. missing data, but you can also spend a bit on extra thought on how to handle missing data, and how to estimate covariance in this case. However, PCA may react badly to non-continuous values... Projecting the data is also more difficult, and you will have to do some kind of missing value imputation then. But didn't the clustering with Gower's suffer from the same problem, too? How did you solve it there?

By any means, don't expect magic to happen. Your data is very dirty and the systematic missing values may require you to do a rather complex missing value estimation, not just some default library call.

  • $\begingroup$ Gowers universal coefficient is robust towards missing data, that is one of its big advantages (see Sneath & Sokal 1973, pp. 135): for individuals j and k and characters i the S_g = Sum(W_ijk S_ijk) / Sum(W_ijk) with the weight set to 1 for a valid and 0 for an invalid comparison. Thus for a missing datum neither the numerator nor the denominator increase. Of course, S_g is based on fewer characters if either individual has missing data, reducing its relevance. But you fully use the information available. $\endgroup$ Jun 6, 2017 at 15:34
  • $\begingroup$ You can do the exact same in PCA. Weighted covariance. That is what I hinted at in the beginning, handle missing data in PCA. $\endgroup$ Jun 6, 2017 at 18:09
  • $\begingroup$ Ah, that would be useful. Is there software available to do this? Perhaps a R package? $\endgroup$ Jun 7, 2017 at 6:12
  • $\begingroup$ I don't use R, but I am pretty sure R can do this without any packages. $\endgroup$ Jun 7, 2017 at 6:24
  • $\begingroup$ I finally solved the problem by "last value carried forward" imputation: Calculate the standard deviations from the mean of the last known result and use that to calculate probable outcomes for the missing values. With that imputed data table, I got meaningful results from a PCA. $\endgroup$ Oct 7, 2023 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.