Learn R Programming

multiway (version 1.0-7)

fitted: Extract Multi-Way Fitted Values

Description

Calculates fitted array (or list of arrays) from a multiway object.

Usage

# S3 method for cpd
fitted(object, ...)
# S3 method for indscal
fitted(object, ...)
# S3 method for mcr
fitted(object, type = c("X", "Y"), ...)
# S3 method for parafac
fitted(object, ...)
# S3 method for parafac2
fitted(object, simplify = TRUE, ...)
# S3 method for sca
fitted(object, ...)
# S3 method for tucker
fitted(object, ...)

Value

"cpd" objects: N-way array.

"indscal" objects: 3-way array.

"mcr" objects: 3-way (X) or 2-way (Y) array.

"parafac" objects: 3-way or 4-way array.

"parafac2" objects: 3-way or 4-way array (if possible and simplify=TRUE); otherwise list of 2-way or 3-way arrays.

"sca" objects: list of 2-way arrays.

"tucker" objects: 3-way or 4-way array.

Arguments

object

Object of class "cpd" (output from cpd), "indscal" (output from indscal), class "mcr" (output from mcr), class "parafac" (output from parafac), class "parafac2" (output from parafac2), class "sca" (output from sca), or class "tucker" (output from tucker).

simplify

For "parafac2", setting simplify = FALSE will always return a list of fitted arrays. Default of simplify = TRUE returns a fitted array if all levels of the nesting mode have the same number of observations (and a list of fitted arrays otherwise).

type

For "mcr", setting type = "X" returns the fitted predictor array (default), whereas setting type = "Y" retuns the fitted response array.

...

Ignored.

Author

Nathaniel E. Helwig <helwig@umn.edu>

Details

See cpd, indscal, mcr, parafac, parafac2, sca, and tucker for more details.

Examples

Run this code
# See examples for... 
#   cpd (Canonical Polyadic Decomposition)
#   indscal (INividual Differences SCALing)
#   mcr (Multiway Covariates Regression)
#   parafac (Parallel Factor Analysis-1)
#   parafac2 (Parallel Factor Analysis-2)
#   sca (Simultaneous Component Analysis)
#   tucker (Tucker Factor Analysis)

Run the code above in your browser using DataLab