Learn R Programming

multiway (version 1.0-2)

resign: Resigns Multi-Way Factors

Description

Resigns factors from a multiway object.

Usage

"resign"(x, mode="B", newsign=1, ...) "resign"(x, mode="A", newsign=1, absorb="C", ...) "resign"(x, mode="A", newsign=1, absorb="C", method="pearson", ...) "resign"(x, mode="B", newsign=1, ...) "resign"(x, mode="A",newsign=1, ...)

Arguments

x
Object of class "indscal" (output from indscal), class "parafac" (output from parafac), class "parafac2" (output from parafac2), class "sca" (output from sca), or class "tucker" (output from tucker).
mode
Character indicating which mode to resign.
newsign
Desired sign for each column of resigned mode. Can input a scalar or a vector with length equal to the number of factors for the given mode. If x is of class "parafac2" and mode="A" you can input a list of covariates (see Details).
absorb
Character indicating which mode should absorb the inverse of the rescalings applied to mode (cannot be equal to mode).
method
Correlation method to use if newsign is a list input (see Details).
...
Ignored.

Value

Same as input.

Details

If x is of class "parafac2" and mode="A", the input newsign can be a list where each element contains a covariate vector for resigning Mode A. You need length(newsign[[k]]) = nrow(x$A$H[[k]]) for all k when newsign is a list. In this case, the resigning is implemented according to the sign of cor(newsign[[k]], x$A$H[[k]]%*%x$A$G[,1], method). See Helwig (2013) for details. See indscal, parafac, parafac2, sca, and tucker for more details.

References

Helwig, N. E. (2013). The special sign indeterminacy of the direct-fitting Parafac2 model: Some implications, cautions, and recommendations, for Simultaneous Component Analysis. Psychometrika, 78, 725-739.

Examples

Run this code

### see examples for indscal, parafac, parafac2, sca, and tucker

Run the code above in your browser using DataLab