**Have a Question?**

**Phone:** +1 (888) 427-9486

+1 (312) 257-3777

Contact Us

# PCA_COMP

Returns an array of cells for the i-th principal component (or residuals).

## Syntax

**PCA**(

^{i}_COMP**X**,

**Mask**,

**Standardize**,

**Number**,

**Return_type**)

**X**

is the independent variables data matrix, such that each column represents one variable.

**Mask**

is the boolean array to select a subset of the input variables in X. If missing, all variables in X are included.

**Standardize**

is a flag or switch to standardize the input variables prior to the analysis (i.e. standardize = 1 (default), subtract mean = 2)).

Order | Description |
---|---|

1 | standardize (subtract mean and divide by standard deviation) (default) |

2 | subtract mean (subtract mean) |

**Number**

is the component number to return. If missing, the first principal component is assumed.

**Return_type**

is a switch to select the return output (1 = proportion of variance (default), 2 = variance, 3 = eigenvalue, 4 = loadings, 5 = PC data).

Method | Description |
---|---|

1 | Proportion of total variance |

2 | Variance |

3 | Eigenvalue |

4 | Loading or weights for input variables |

5 | Principal component (PC) data |

## Remarks

- The underlying model is described here.
- The PCA_COMP function must be entered as an array formula (for return-types greater than 3) in a range that has the rows as the number of variables (return-type = 4) or the number of observations (return-type = 5).
- The sample data may include missing values.
- Each column in the input matrix corresponds to a separate variable.
- Each row in the input matrix corresponds to an observation.
- Observations (i.e. row) with missing values are removed.
- The PC_COMP function is available starting with version 1.60 APACHE.

## Examples

## References

- Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
- Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
- Jolliffe, I.T. (2002). Principal Component Analysis, second edition (Springer).