Bootstrap percentile intervals for CANDECOMP/PARAFAC
Produces percentile intervals for all output parameters. The percentile intervals indicate the instability of the sample solutions.
bootstrapCP(X, A, B, C, n, m, p, r, ort1, ort2, ort3, conv, centopt, normopt, scaleopt, maxit, laba, labb, labc)
X
: Matrix (or data.frame coerced to a matrix) of order (n
x
mp
) containing the matricized array (frontal slices)A
: Component matrix for the A
-modeB
: Component matrix for the B
-modeC
: Component matrix for the C
-moden
: Number of A
-mode entities of X
m
: Number of B
-mode entities of X
p
: Number of C
-mode entities of X
r
: Number of extracted componentsort1
: Type of constraints on A
(see CP
)ort2
: Type of constraints on B
(see CP
)ort3
: Type of constraints on C
(see CP
)conv
: Convergence criterioncentopt
: Centering option (see cent3
)normopt
: Normalization option (see norm3
)scaleopt
: Scaling option (see renormsolCP
)maxit
: Maximal number of iterationslaba
: Optional vector of length n
containing the labels of the A
-mode entitieslabb
: Optional vector of length m
containing the labels of the B
-mode entitieslabc
: Optional vector of length p
containing the labels of the C
-mode entitiesA list including the following components: - Bint: Bootstrap percentile interval of every element of B
Cint: Bootstrap percentile interval of every element of C
fpint: Bootstrap percentile interval for the goodness of fit index expressed as a percentage
The preprocessing must be done in same way as for sample analysis.
The resampling mode must be the A
-mode.
The starting points for every bootstrap solution are two: rational (using SVD) and solution from the observed sample.
H.A.L. Kiers (2004). Bootstrap confidence intervals for three-way methods. Journal of Chemometrics 18:22--36.
Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it
bootstrapT3
, CP
, percentile95
data(TV) TVdata=TV[[1]] labSCALE=TV[[2]] labPROGRAM=TV[[3]] labSTUDENT=TV[[4]] # permutation of the modes so that the A-mode refers to students TVdata <- permnew(TVdata, 16, 15, 30) TVdata <- permnew(TVdata, 15, 30, 16) # CP solution TVcp <- CPfuncrep(TVdata, 30, 16, 15, 2, 1, 1, 1, 0, 1e-6, 10000) ## Not run: # Bootstrap analysis on CP solution boot <- bootstrapCP(TVdata, TVcp$A, TVcp$B, TVcp$C, 30, 16, 15, 2, 1, 1, 1, 1e-6, 0, 0, 0, 10000, labSTUDENT, labSCALE, labPROGRAM) # Bootstrap analysis on CP solution (when labels are not available) boot <- bootstrapCP(TVdata, TVcp$A, TVcp$B, TVcp$C, 30, 16, 15, 2, 1, 1, 1, 1e-6, 0, 0, 0, 10000) ## End(Not run)
Useful links