fitted: Extract Multi-Way Fitted Values

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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

1
2
3
4
5
6
7
8
# 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)

Example output

Loading required package: CMLS
Loading required package: quadprog
Loading required package: parallel

multiway documentation built on May 2, 2019, 6:47 a.m.