principal_component_analysis
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| principal_component_analysis [2019/11/14 21:00] – hkimscil | principal_component_analysis [2019/11/16 06:06] (current) – [e.g. saq] hkimscil | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== PCA ====== | ====== PCA ====== | ||
| + | [[https:// | ||
| + | * Both are data reduction techniques — they allow you to capture the variance in variables in a smaller set. | ||
| + | * Both are usually run in stat software using the same procedure, and the output looks pretty much the same. | ||
| + | * The steps you take to run them are the same-extraction, | ||
| + | * Despite all these similarities, | ||
| + | ====== Some useful lectures ====== | ||
| + | |||
| {{youtube> | {{youtube> | ||
| <WRAP clear /> | <WRAP clear /> | ||
| Line 153: | Line 160: | ||
| ggtitle(" | ggtitle(" | ||
| </ | </ | ||
| + | |||
| + | ====== e.g. saq ====== | ||
| + | SPSS Anxiety Questionnaire | ||
| + | {{: | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | # saq <- read.csv(" | ||
| + | saq8 <- read.csv(" | ||
| + | head(saq8) | ||
| + | saq8 <- saq8[c(-1)] | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | > round(cor(saq8), | ||
| + | stat_cry afraid_spss sd_excite nmare_pearson du_stat lexp_comp comp_hate good_math | ||
| + | stat_cry | ||
| + | afraid_spss | ||
| + | sd_excite | ||
| + | nmare_pearson | ||
| + | du_stat | ||
| + | lexp_comp | ||
| + | comp_hate | ||
| + | good_math | ||
| + | > | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | install.packages(" | ||
| + | library(Hmisc) | ||
| + | saq8.rcorr <- rcorr(as.matrix(saq8)) | ||
| + | |||
| + | print(saq8.rcorr$r, | ||
| + | </ | ||
| + | |||
| + | |||
principal_component_analysis.1573765252.txt.gz · Last modified: by hkimscil
