FAQ - Frequently Asked Questions

 Browse FAQ      Browse Documentation Wiki   movie Browse EigenGuide Videos
SearchSearch for Keyword(s):


    How do I manually calculate the limits for scores?

Possible Solutions:

    Individual scores limits can be calculated using the code below, given a PCA model (modl), the pc of interest (pc), and the % confidence limit level desired (limitsvalue):
      pc = 2;  %which PC to calculate limit for
      limitsvalue = 95;  % confidence level (in %)
      L = modl.detail.ssq(pc,2);            %get eigenvalue
      m = length(modl.detail.includ{1,1});  %get number of samples
      scorelimit = sqrt(L * tsqlim(m,1,limitsvalue));

    To calculate scores limits for PCR models, the above must be slightly modified because the eigenvalues are stored in a different field. Replace the "L = ..." line above with this:
      L = modl.detail.pcassq(pc,2);         %get PCR model eigenvalue

    For PLS models, you must approximate L (the eigenvalue) from the RMSE of the calibration data scores:
      L = rmse(modl.loads{1,1}(:,pc)).^2;   %estimate PLS model eigenvalue

    This code assumes that no samples were excluded in the model. If any samples were excluded, use the modl.detail.includ{1} field to calculate L from only the included samples.


    • To calculate limits for T2 and Q, see the related FAQ.

    • Note that in some older versions of PLS_Toolbox, scores were calculated slightly differently than this method. For more information see this related FAQ.

Still having problems? Check our documentation Wiki or try writing our helpdesk at helpdesk@eigenvector.com