This function is used in FastHCS to compute the parameter estimates of the PCA models used at different steps of the algorithm. It is an internal function not intended to be called by the user.

1 | ```
compPcaParams(x,fitd,q=NULL,z0=NULL,seed=1)
``` |

`x` |
A data matrix x. |

`fitd` |
The (internal) result of a call to FastHCS. |

`q` |
Desired rank of the SVD decomposition. |

`z0` |
Optional. Result of a call to |

`seed` |
Seed used to initialize the RNG. Defaults to 1. |

A list with the following components:

`center` |
The multivariate mean of the observations with indexes in best. |

`loadings` |
The (rank q) loadings matrix of the observations with indexes in best. |

`eigenvalues` |
The eigenvalues of the observations with indexes in best multiplied by a consistency factor. |

`scores` |
The value of the projected on the space of the principal components data (the centred data multiplied by the loadings matrix) is returned. Hence, cov(scores) is the diagonal matrix diag(eigenvalues). |

Kaveh Vakili, Eric Schmitt

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.