Faq how do I calculate my own T2 and Q limits: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Lyle
(Created page with "===Issue:=== How do I calculate my own T<sup>2</sup> and Q limits? ===Possible Solutions:=== Confidence limits for Q residuals (also known as "SPE") and Hotellings T<sup>2<...")
 
imported>Lyle
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:


Confidence limits for Q residuals (also known as "SPE") and Hotellings T<sup>2</sup> can be calculated using the commands:  
Confidence limits for Q residuals (also known as "SPE") and Hotellings T<sup>2</sup> can be calculated using the commands:  
  residuallimit
  >> residuallimi
  tsqlim
  >> tsqlim
To calculate new residual limits, you must pass the eigenvalues for the residuals from the model. Assuming you have a model structure named "model":  
To calculate new residual limits, you must pass the eigenvalues for the residuals from the model. Assuming you have a model structure named "model":  
  >>qlimit = residuallimit(model.detail.reseig,cl);
  >> qlimit = residuallimit(model.detail.reseig,cl);
where <code>cl</code> is the confidence limit desired (in fractional confidence limit: 0.95 ). Note that for some model types, <code>.detail.reseig</code> is not defined. In these cases, you'll need to calculate the raw residuals themselves. You can usually do this with <code>datahat</code>, but you need to pass the original calibration data along with the model:  
where <code>cl</code> is the confidence limit desired (in fractional confidence limit: 0.95 ). Note that for some model types, <code>.detail.reseig</code> is not defined. In these cases, you'll need to calculate the raw residuals themselves. You can usually do this with <code>datahat</code>, but you need to pass the original calibration data along with the model:  
  >> [xhat,residuals] = datahat(model,data);
  >> [xhat,residuals] = datahat(model,data);
Line 19: Line 19:
Note that <code>tsqlim</code> supplies the same result whether <code>cl</code> is a percent or fractional but <code>residuallimit</code> requires the fraction <code>cl</code>.
Note that <code>tsqlim</code> supplies the same result whether <code>cl</code> is a percent or fractional but <code>residuallimit</code> requires the fraction <code>cl</code>.


To calculate limits for individual scores, [[faq_how_do_manually_calculate_the_limits_for_scores|see the related FAQ.  
To calculate limits for individual scores, [[faq_how_do_manually_calculate_the_limits_for_scores|see the related FAQ.]]
 


'''Still having problems? Please contact our helpdesk at [mailto:helpdesk@eigenvector.com helpdesk@eigenvector.com]'''
'''Still having problems? Please contact our helpdesk at [mailto:helpdesk@eigenvector.com helpdesk@eigenvector.com]'''


[[Category:FAQ]]
[[Category:FAQ]]

Latest revision as of 13:22, 5 December 2018

Issue:

How do I calculate my own T2 and Q limits?

Possible Solutions:

Confidence limits for Q residuals (also known as "SPE") and Hotellings T2 can be calculated using the commands:

>> residuallimi
>> tsqlim

To calculate new residual limits, you must pass the eigenvalues for the residuals from the model. Assuming you have a model structure named "model":

>> qlimit = residuallimit(model.detail.reseig,cl);

where cl is the confidence limit desired (in fractional confidence limit: 0.95 ). Note that for some model types, .detail.reseig is not defined. In these cases, you'll need to calculate the raw residuals themselves. You can usually do this with datahat, but you need to pass the original calibration data along with the model:

>> [xhat,residuals] = datahat(model,data);
>> qlimit = residuallimit(residuals,cl);

To calculate new T2 limits, tsqlim can be called very simply:

>> tsqcl = tsqlim(m,pc,cl);

where m is the number of samples in the model, pc is the number of PCs (or LVs) in the model, and cl is the confidence limit desired.

Note that tsqlim supplies the same result whether cl is a percent or fractional but residuallimit requires the fraction cl.

To calculate limits for individual scores, see the related FAQ.


Still having problems? Please contact our helpdesk at helpdesk@eigenvector.com