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/15 13:27] – [e.g. saq] hkimscil | principal_component_analysis [2019/11/16 06:06] (current) – [e.g. saq] hkimscil | ||
|---|---|---|---|
| Line 163: | Line 163: | ||
| ====== e.g. saq ====== | ====== e.g. saq ====== | ||
| SPSS Anxiety Questionnaire | SPSS Anxiety Questionnaire | ||
| - | {{: | + | {{:r:saq8.csv}} |
| - | < | + | < |
| + | # 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.1573824431.txt.gz · Last modified: by hkimscil
