krackhardt_datasets
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| krackhardt_datasets [2019/12/13 13:47] – hkimscil | krackhardt_datasets [2019/12/13 14:11] (current) – hkimscil | ||
|---|---|---|---|
| Line 226: | Line 226: | ||
| krack_advice_matrix <- rbind(krack_advice_matrix_row_to_col, | krack_advice_matrix <- rbind(krack_advice_matrix_row_to_col, | ||
| krack_advice_matrix | krack_advice_matrix | ||
| - | |||
| - | krack_reports_to_advice_matrix <- rbind(krack_reports_to_matrix, | ||
| - | krack_reports_to_advice_matrix | ||
| </ | </ | ||
| + | |||
| < | < | ||
| Line 248: | Line 246: | ||
| krack_friend_matrix <- rbind(krack_friend_matrix_row_to_col, | krack_friend_matrix <- rbind(krack_friend_matrix_row_to_col, | ||
| krack_friend_matrix | krack_friend_matrix | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | # ra (ar) | ||
| + | krack_reports_to_advice_matrix <- rbind(krack_reports_to_matrix, | ||
| + | krack_reports_to_advice_matrix | ||
| + | |||
| + | # fa | ||
| + | krack_friend_advice_matrix <- rbind(krack_friend_matrix, | ||
| + | krack_friend_advice_matrix | ||
| + | |||
| + | # fr | ||
| + | krack_friend_reports_to_matrix <- rbind(krack_friend_matrix, | ||
| + | krack_friend_reports_to_matrix | ||
| + | |||
| + | |||
| + | # far | ||
| + | krack_friend_advice_reports_to_matrix <- rbind(krack_friend_advice_matrix, | ||
| + | krack_friend_advice_reports_to_matrix | ||
| </ | </ | ||
| Line 258: | Line 276: | ||
| krack_reports_to_advice_cors <- cor(as.matrix(krack_reports_to_advice_matrix)) | krack_reports_to_advice_cors <- cor(as.matrix(krack_reports_to_advice_matrix)) | ||
| krack_reports_to_advice_cors | krack_reports_to_advice_cors | ||
| + | |||
| + | krack_friend_advice_cors <- cor(as.matrix(krack_friend_advice_matrix)) | ||
| + | krack_friend_advice_cors | ||
| + | |||
| + | krack_friend_reports_to_cors <- cor(as.matrix(krack_friend_reports_to_matrix)) | ||
| + | krack_friend_reports_to_cors | ||
| + | |||
| + | krack_friend_advice_reports_to_cors <- cor(as.matrix(krack_friend_advice_reports_to_matrix)) | ||
| + | krack_friend_advice_reports_to_cors | ||
| + | |||
| + | |||
| </ | </ | ||
| Line 266: | Line 295: | ||
| # or equal to 0; thus, highly dissimilar (i.e., negatively | # or equal to 0; thus, highly dissimilar (i.e., negatively | ||
| # correlated) actors have higher values. | # correlated) actors have higher values. | ||
| - | dissimilarity | + | dissimilarity_ra |
| - | krack_reports_to_dist | + | krack_reports_to_advice_dist |
| - | krack_reports_to_dist | + | krack_reports_to_advice_dist |
| + | dissimilarity_fa <- 1 - krack_friend_advice_cors | ||
| + | krack_friend_advice_dist <- as.dist(dissimilarity_fa) | ||
| + | krack_friend_advice_dist | ||
| + | |||
| + | dissimilarity_rf <- 1 - krack_reports_to_friend_cors | ||
| + | krack_reports_to_friend_dist <- as.dist(dissimilarity_rf) | ||
| + | krack_reports_to_friend_dist | ||
| + | |||
| + | dissimilarity_far <- 1 - krack_friend_advice_reports_to_cors | ||
| + | krack_friend_advice_reports_to_dist <- as.dist(dissimilarity_far) | ||
| + | krack_friend_advice_reports_to_dist | ||
| + | |||
| + | |||
| + | |||
| # Note that it is also possible to use dist() directly on the | # Note that it is also possible to use dist() directly on the | ||
| # matrix. However, since cor() looks at associations between | # matrix. However, since cor() looks at associations between | ||
krackhardt_datasets.1576212468.txt.gz · Last modified: by hkimscil
