DLims
Location: ..\cubatch\Model_PARAFAC\private\DLims.m
function
StatsOut = DLims(Pred_Fun,Mode,Limit,Data,Model,Validation,ConfLim,FillIn,Segments,StatsIn,Cen,Scal,PreProc);
Description:
Computes the D-statistics, values, its limits, the contribution to the
D-statistic of the different variables in the various dimensions of the array
for a given nPLS1/PLS1 model.
Apart from the contributions the statistics can be computed
both in an 'offline'
and an 'online'
mode.
NB This function will likely undergo some simplifications
in the future releases of the syntax as many
of the input parameters are contained in the same data structure.
Inputs:
Pred_Fun:
function computing the prediction for the desired model.
It can be a string (for MatLab©
5.3 or superior) or
a function handle (for MatLab©
6.x or superior)
Mode: 'on'/'off'
=>
'online'/'offline'
Limit: 0/1 compute/do not compute D-statistics limits (based on
Data for the D-statistics contributions)
Data: array of doubles with the data used to compute the statistics
Model: model's parameters as required by Pred_Fun
(i.e. as a structure
ModelOut.model)
Validation: model's parameters as determined throught the validation
procedure (ModelOut.validation). It
is not currently used but it can be employed in future releases to compute
confidence limits for the contributions to the D-statistic.
ConfLim: "alpha"s for the confidence intervals (if empty or not given: 95% and 99%).
FillIn: fill in method: 'Current
deviation'/'zero', necessary only when
Mode is
'on'
Segments: Validation segments (ModelOut.validation.segments).
Necessary only for D-statistics contributions.
NB. this parameter is somewhat superfluous as already contained in
Validation and therefore will likely be eliminated in future versions
StatsIn: structure holding the statistics (if previously calculated)
Cen,Scal: preprocessing parameters as contained in Model.xpreproc.
PreProcess: Stores the preprocessing information for the model of
reference.
It contains two fields: 'modx' (for X) and
'mody' (for Y). Each of them has two fields: 'cen' and
'scal', which are row vectors of the same
length as the original X and Y and refer to centre and scaling.
1 means centre/scale according to mean and standard deviation.
The 'scal' values can also be 2 (scaling with
Root Mean Squares) or 3 (scaling with Frobenius norm)
NB
these parameters are somewhat superfluous as already contained in Model
and therefore will likely be eliminated in future versions
Outputs:
StatsOut: structure holding the
various statistics relative to Data. With respect to StatsIn the
fields relative to the D-statistics (with respect to Mode) are filled in.
Called by:
Model_PARAFAC\Plot_DStatistics
Subroutines:
Internal: None
External:
onlineres,
Pred_Fun
Author:
Giorgio Tomasi
Royal Agricultural and Veterinary University
MLI, LMT, Chemometrics group
Rolighedsvej 30
DK-1958 Frederiksberg C
Danmark
Last modified: 04-Nov-2002 12:05:42
Contact: Giorgio Tomasi, gt@kvl.dk
References
[1] Nomikos P., Mac Gregor J.F.,
"Monitoring batch process using multiway principal component analysis", AIChE
journal, Vol 40, n°8, 1994, 1361-1373
[2] Westerhuis,J.A.; Gurden,S.P.; Smilde,A.K.,"Generalized
contribution plots in multivariat statistical process monitoring",
Chemometrics and Intelligent Laboratory Systems, Vol 51, 2000, 96-114