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 22:28] – [e.g. saq] hkimscil | principal_component_analysis [2019/11/16 15:06] (current) – [e.g. saq] hkimscil | ||
---|---|---|---|
Line 167: | Line 167: | ||
- | < | + | < |
+ | # 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.txt · Last modified: 2019/11/16 15:06 by hkimscil