Learn R Programming

ThreeWay (version 1.1.4)

bootstrapCP: Bootstrap percentile intervals for CANDECOMP/PARAFAC

Description

Produces percentile intervals for all output parameters. The percentile intervals indicate the instability of the sample solutions.

Usage

bootstrapCP(X, A, B, C, n, m, p, r, ort1, ort2, ort3, conv, centopt, normopt, 
  scaleopt, maxit, laba, labb, labc)

Value

A 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

Arguments

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-mode

B

Component matrix for the B-mode

C

Component matrix for the C-mode

n

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 components

ort1

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 criterion

centopt

Centering option (see cent3)

normopt

Normalization option (see norm3)

scaleopt

Scaling option (see renormsolCP)

maxit

Maximal number of iterations

laba

Optional vector of length n containing the labels of the A-mode entities

labb

Optional vector of length m containing the labels of the B-mode entities

labc

Optional vector of length p containing the labels of the C-mode entities

Author

Maria Antonietta Del Ferraro mariaantonietta.delferraro@yahoo.it
Henk A.L. Kiers h.a.l.kiers@rug.nl
Paolo Giordani paolo.giordani@uniroma1.it

References

H.A.L. Kiers (2004). Bootstrap confidence intervals for three-way methods. Journal of Chemometrics 18:22--36.

See Also

bootstrapT3, CP, percentile95

Examples

Run this code
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)
if (FALSE) {
# 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)
}

Run the code above in your browser using DataLab