Estimation of component spectra by the principal components method