fitted {multiway}R Documentation

Extract Multi-Way Fitted Values

Description

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

Usage

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

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.

Details

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

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.

Author(s)

Nathaniel E. Helwig <helwig@umn.edu>

Examples

# 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)

[Package multiway version 1.0-6 Index]