This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #------------------------------------------------------------------------------# | |
| # RRB DATA ANALYSIS | |
| # | |
| #RRB: Raw dataset containing restricted and repetitive behavioural data from the ADIR1 taken from the AGRE database | |
| # cRRB: Cleaned dataset containing all RRB variables, with duplicates and NA values removed | |
| # RRB_subscales: Character vector listing the names of RRB variables only (not overall score) | |
| # RRB_exp: Dataset derived from cRRB including only the RRB subscale variables defined in RRB_subscales | |
| # | |
| # | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #------------------------------------------------------------------------------# | |
| # RRB DATA ANALYSIS | |
| # | |
| #RRB: Raw dataset containing restricted and repetitive behavioural data from the ADIR1 taken from the AGRE database | |
| # cRRB: Cleaned dataset containing all RRB variables, with duplicates and NA values removed | |
| # RRB_subscales: Character vector listing the names of RRB variables only (not overall score) | |
| # RRB_friedman: Dataset derived from cRRB including only the RRB subscale variables defined in RRB_subscales | |
| # RRB_demo: A dataset derived from cRRB that includes RRB subscales and the overall RRB score | |
| # | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #------------------------------------------------------------------------------# | |
| # RRB data analysis | |
| # | |
| # | |
| # | |
| #------------------------------------------------------------------------------# | |
| setwd("~/Desktop/My project") | |
| RRB <- read.csv("RRB.ADIR1.csv") | |
| Medical_data <- read.csv("AffChild1.csv") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pearson correlation heatmap | |
| corr_matrix <- cor( | |
| cRRB[, EXPsubscore_columns], | |
| use = "pairwise.complete.obs", | |
| method = "pearson" | |
| ) | |
| # Hierarchical clustering using correlation distance | |
| dist_mat <- as.dist(1 - corr_matrix) | |
| hc <- hclust(dist_mat, method = "average") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setwd("~/Desktop/My project") | |
| RRB <- read.csv("RRB.ADIR1.csv") | |
| Medical_data <- read.csv("AffChild1.csv") | |
| Medical_data2 <- read.csv("AffChild2.csv") | |
| Medical_data3 <- read.csv("AffChild3.csv") | |
| # Loading libraries | |
| library(ggplot2) | |
| library(tidyverse) |