Description Usage Arguments Details Value See Also Examples

This function is an extended wrapper for prcomp(). I takes a data_ls object created by f_clean_data and calculates the contribution of each variable to each principle component in percent.

1 2 |

`data_ls` |
data_ls object generated by f_clean_data(), or a named list list( data = <dataframe>, numericals = < vector with column names of numerical columns>) |

`center` |
boolean, Default: T |

`scale` |
boolean, Default: T |

`use_boxcox_tansformed_vars` |
boolean, Default: T |

`include_ordered_categoricals` |
boolean, Default: T |

Blog post explaining how to calculate contributions

a list with the original data complemented with the principle component vector data of each observation and an object returned by prcomp() supplemented with some extra features

`data` |
dataframe |

`pca` |
pca object created by prcomp() |

**added features of pca**:

`cos2` |
The squared rotation vectors.A value between 0 and 1 denotes the amount of contribution of a variable to a specific principle component |

`vae` |
percent variance explained |

`contrib_abs_perc` |
The absolute contribution of one variable to the variance explained by one principle component in percent. The total contibution adds up to the total contibution of the principle componaent in percent. |

`contrib_abs_perc_reduced` |
as above but variables contibuting less than 2.5 percent are grouped |

`threshold_vae_for_pc_perc` |
principle components that explain less percent variance than this threshold are dropped |

1 2 3 | ```
pca_ls = f_clean_data(mtcars) %>%
f_boxcox() %>%
f_pca()
``` |

erblast/oetteR documentation built on April 5, 2018, 9:03 a.m.

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.