Source: https://github.com/markziemann/asd_meth

Introduction

Here we are looking at the clinical covariates, to see the correlation structure between ADOS, SRS, motor skills, language, IQ and anything else I can find. There is no methylation data in this analysis.

suppressPackageStartupMessages({
  library("kableExtra")
  library("dplyr")
  library("RColorBrewer")
  library("gplots")
  library("ggplot2")
  library("beeswarm")
})

Load data

Load the clinical characteristics.

x <- read.csv("ASD_EPIC_DATA/ASD_blood_summarysheet.csv")

Exploratory analysis

Make an overview of the clinical data with a heatmap.

dat <- x[,8:20]

heatmap.2(t(dat),trace="none",scale="row",mar=c(5,12))

heatmap.2(cor(dat,method="s"),trace="none",scale="none",mar=c(12,12),
  main="spearman correlation of covariates")

heatmap.2(cor(t(dat),method="s"),trace="none",scale="none",mar=c(12,12), 
  main="spearman correlation of participants")

Dimensions of ASD

Let’s take a look at the correlations of dimensions:

  • Motor skills

  • Social interaction score (ADOS)

  • Diagnosis

  • Social responsiveness score (SRS)

  • Language

  • IQ

head(dat)
##   Age_years Birth_mode Birth_complications gestational_age Birth_weight.g.
## 1        17          1                   0              35            2112
## 2        17          1                   0              35            2680
## 3        11          1                   0              36            2240
## 4        11          1                   0              36            3395
## 5         7          1                   0              36            2220
## 6         7          1                   0              36            2020
##   Birth_order Help_breathing_start Motor_skills Social_interaction_on_ADOS
## 1           1                    1            2                          3
## 2           2                    1            2                         12
## 3           1                    0            2                          9
## 4           2                    0            0                         13
## 5           2                    1            1                         15
## 6           1                    1            1                         12
##   Diagnosis SRS_social_scores language  IQ
## 1         0               103       53  62
## 2         2               121       61  68
## 3         1                84      113  98
## 4         2                47      113 105
## 5         2                74      102 110
## 6         1                94      108 103
dat2 <- dat[,8:13]

heatmap.2(cor(dat2,method="s"),trace="none",scale="none",
  mar=c(12,12),cexRow=1,cexCol=1)

cor(dat2,method="s") %>%
  kbl(caption = "Spearman correlation of") %>%
  kable_paper("hover", full_width = F)
Spearman correlation of
Motor_skills Social_interaction_on_ADOS Diagnosis SRS_social_scores language IQ
Motor_skills 1.0000000 0.2096529 0.2360120 0.6985974 -0.2873085 -0.2353918
Social_interaction_on_ADOS 0.2096529 1.0000000 0.8311849 0.4049742 -0.4796687 -0.3644388
Diagnosis 0.2360120 0.8311849 1.0000000 0.3381724 -0.4475827 -0.3229775
SRS_social_scores 0.6985974 0.4049742 0.3381724 1.0000000 -0.4872838 -0.5103309
language -0.2873085 -0.4796687 -0.4475827 -0.4872838 1.0000000 0.9516536
IQ -0.2353918 -0.3644388 -0.3229775 -0.5103309 0.9516536 1.0000000

Independent-Dependent Variable Analysis

We will be exploring how the dependent variables associate with the dependent variables.

Independent variables: Sex, Age, Birth_mode, Birth_complications, gestational_age, Birth_weight.g., Birth_order, Help_breathing_start.

Dependent vaiables: Motor_skills, Social_interaction_on_ADOS, Diagnosis, SRS_social_scores, language, IQ.

Ideally I should be able to create a function to do this more or less automatically, but the data are in different forms (categories, ordinals, vectors), so it might be complicated.

First I will look at sex (2 categories).

table(x$Sex)
## 
##  1  2 
##  6 12
length(which(x$Sex==1))
## [1] 6
length(which(x$Sex==2))
## [1] 12
message("sex-motorskills")
## sex-motorskills
wilcox.test(subset(x,Sex==1)$Motor_skills,subset(x,Sex==2)$Motor_skills)
## Warning in wilcox.test.default(subset(x, Sex == 1)$Motor_skills, subset(x, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Sex == 1)$Motor_skills and subset(x, Sex == 2)$Motor_skills
## W = 40, p-value = 0.7169
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$Motor_skills,"sex2"=subset(x,Sex==2)$Motor_skills)
beeswarm(l,ylab="motor skills",cex=2,pch=19)

message("sex-ados")
## sex-ados
wilcox.test(subset(x,Sex==1)$Social_interaction_on_ADOS,subset(x,Sex==2)$Social_interaction_on_ADOS)
## Warning in wilcox.test.default(subset(x, Sex == 1)$Social_interaction_on_ADOS,
## : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Sex == 1)$Social_interaction_on_ADOS and subset(x, Sex == 2)$Social_interaction_on_ADOS
## W = 34, p-value = 0.8879
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$Social_interaction_on_ADOS,"sex2"=subset(x,Sex==2)$Social_interaction_on_ADOS)
beeswarm(l,ylab="ADOS",cex=2,pch=19)

message("sex-diagnosis")
## sex-diagnosis
wilcox.test(subset(x,Sex==1)$Diagnosis,subset(x,Sex==2)$Diagnosis)
## Warning in wilcox.test.default(subset(x, Sex == 1)$Diagnosis, subset(x, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Sex == 1)$Diagnosis and subset(x, Sex == 2)$Diagnosis
## W = 33.5, p-value = 0.8346
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$Diagnosis,"sex2"=subset(x,Sex==2)$Diagnosis)
beeswarm(l,ylab="Diagnosis",cex=2,pch=19)

message("sex-srs")
## sex-srs
wilcox.test(subset(x,Sex==1)$SRS_social_scores,subset(x,Sex==2)$SRS_social_scores)
## 
##  Wilcoxon rank sum exact test
## 
## data:  subset(x, Sex == 1)$SRS_social_scores and subset(x, Sex == 2)$SRS_social_scores
## W = 57, p-value = 0.0529
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$SRS_social_scores,"sex2"=subset(x,Sex==2)$SRS_social_scores)
beeswarm(l,ylab="SRS",cex=2,pch=19)

message("sex-language")
## sex-language
wilcox.test(subset(x,Sex==1)$language,subset(x,Sex==2)$language)
## Warning in wilcox.test.default(subset(x, Sex == 1)$language, subset(x, Sex == :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Sex == 1)$language and subset(x, Sex == 2)$language
## W = 35.5, p-value = 1
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$language,"sex2"=subset(x,Sex==2)$language)
beeswarm(l,ylab="language",cex=2,pch=19)

message("sex-IQ")
## sex-IQ
wilcox.test(subset(x,Sex==1)$IQ,subset(x,Sex==2)$IQ)
## Warning in wilcox.test.default(subset(x, Sex == 1)$IQ, subset(x, Sex == :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Sex == 1)$IQ and subset(x, Sex == 2)$IQ
## W = 36.5, p-value = 1
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$IQ,"sex2"=subset(x,Sex==2)$IQ)
beeswarm(l,ylab="IQ",cex=2,pch=19)

message("sex-famID")
## sex-famID
wilcox.test(subset(x,Sex==1)$Family_ID,subset(x,Sex==2)$Family_ID)
## Warning in wilcox.test.default(subset(x, Sex == 1)$Family_ID, subset(x, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Sex == 1)$Family_ID and subset(x, Sex == 2)$Family_ID
## W = 12, p-value = 0.02702
## alternative hypothesis: true location shift is not equal to 0
l <- list("sex1"=subset(x,Sex==1)$Family_ID,"sex2"=subset(x,Sex==2)$Family_ID)
beeswarm(l,ylab="Family_ID",cex=2,pch=19)

Now I will look at Birth_mode (categorical).

table(x$Birth_mode)
## 
##  0  1  2  3 
##  1 14  2  1
message("birthmode-motorskills")
## birthmode-motorskills
wilcox.test(subset(x,Birth_mode==1)$Motor_skills,subset(x,Birth_mode==2)$Motor_skills)
## Warning in wilcox.test.default(subset(x, Birth_mode == 1)$Motor_skills, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_mode == 1)$Motor_skills and subset(x, Birth_mode == 2)$Motor_skills
## W = 21, p-value = 0.2464
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$Motor_skills,"Birth_mode2"=subset(x,Birth_mode==2)$Motor_skills)
beeswarm(l,ylab="motor skills",cex=2,pch=19)

message("Birth_mode-ados")
## Birth_mode-ados
wilcox.test(subset(x,Birth_mode==1)$Social_interaction_on_ADOS,subset(x,Birth_mode==2)$Social_interaction_on_ADOS)
## Warning in wilcox.test.default(subset(x, Birth_mode ==
## 1)$Social_interaction_on_ADOS, : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_mode == 1)$Social_interaction_on_ADOS and subset(x, Birth_mode == 2)$Social_interaction_on_ADOS
## W = 19, p-value = 0.473
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$Social_interaction_on_ADOS,"Birth_mode2"=subset(x,Birth_mode==2)$Social_interaction_on_ADOS)
beeswarm(l,ylab="ADOS",cex=2,pch=19)

message("Birth_mode-diagnosis")
## Birth_mode-diagnosis
wilcox.test(subset(x,Birth_mode==1)$Diagnosis,subset(x,Birth_mode==2)$Diagnosis)
## Warning in wilcox.test.default(subset(x, Birth_mode == 1)$Diagnosis, subset(x,
## : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_mode == 1)$Diagnosis and subset(x, Birth_mode == 2)$Diagnosis
## W = 16.5, p-value = 0.7292
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$Diagnosis,"Birth_mode2"=subset(x,Birth_mode==2)$Diagnosis)
beeswarm(l,ylab="Diagnosis",cex=2,pch=19)

message("Birth_mode-srs")
## Birth_mode-srs
wilcox.test(subset(x,Birth_mode==1)$SRS_social_scores,subset(x,Birth_mode==2)$SRS_social_scores)
## 
##  Wilcoxon rank sum exact test
## 
## data:  subset(x, Birth_mode == 1)$SRS_social_scores and subset(x, Birth_mode == 2)$SRS_social_scores
## W = 28, p-value = 0.01667
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$SRS_social_scores,"Birth_mode2"=subset(x,Birth_mode==2)$SRS_social_scores)
beeswarm(l,ylab="SRS",cex=2,pch=19)

message("Birth_mode-language")
## Birth_mode-language
wilcox.test(subset(x,Birth_mode==1)$language,subset(x,Birth_mode==2)$language)
## Warning in wilcox.test.default(subset(x, Birth_mode == 1)$language, subset(x, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_mode == 1)$language and subset(x, Birth_mode == 2)$language
## W = 14, p-value = 1
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$language,"Birth_mode2"=subset(x,Birth_mode==2)$language)
beeswarm(l,ylab="language",cex=2,pch=19)

message("Birth_mode-IQ")
## Birth_mode-IQ
wilcox.test(subset(x,Birth_mode==1)$IQ,subset(x,Birth_mode==2)$IQ)
## Warning in wilcox.test.default(subset(x, Birth_mode == 1)$IQ, subset(x, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_mode == 1)$IQ and subset(x, Birth_mode == 2)$IQ
## W = 13.5, p-value = 1
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$IQ,"Birth_mode2"=subset(x,Birth_mode==2)$IQ)
beeswarm(l,ylab="IQ",cex=2,pch=19)

message("Birth_mode-famID")
## Birth_mode-famID
wilcox.test(subset(x,Birth_mode==1)$Family_ID,subset(x,Birth_mode==2)$Family_ID)
## Warning in wilcox.test.default(subset(x, Birth_mode == 1)$Family_ID, subset(x,
## : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_mode == 1)$Family_ID and subset(x, Birth_mode == 2)$Family_ID
## W = 0, p-value = 0.03107
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_mode1"=subset(x,Birth_mode==1)$Family_ID,"Birth_mode2"=subset(x,Birth_mode==2)$Family_ID)
beeswarm(l,ylab="Family_ID",cex=2,pch=19)

Now look at breathing assistance (categorical).

message("Help_breathing_start-motorskills")
## Help_breathing_start-motorskills
wilcox.test(subset(x,Help_breathing_start==0)$Motor_skills,subset(x,Help_breathing_start==1)$Motor_skills)
## Warning in wilcox.test.default(subset(x, Help_breathing_start ==
## 0)$Motor_skills, : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Help_breathing_start == 0)$Motor_skills and subset(x, Help_breathing_start == 1)$Motor_skills
## W = 32, p-value = 0.7169
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$Motor_skills,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$Motor_skills)
beeswarm(l,ylab="motor skills",cex=2,pch=19)

message("Help_breathing_start-ados")
## Help_breathing_start-ados
wilcox.test(subset(x,Help_breathing_start==0)$Social_interaction_on_ADOS,subset(x,Help_breathing_start==1)$Social_interaction_on_ADOS)
## Warning in wilcox.test.default(subset(x, Help_breathing_start ==
## 0)$Social_interaction_on_ADOS, : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Help_breathing_start == 0)$Social_interaction_on_ADOS and subset(x, Help_breathing_start == 1)$Social_interaction_on_ADOS
## W = 46, p-value = 0.3719
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$Social_interaction_on_ADOS,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$Social_interaction_on_ADOS)
beeswarm(l,ylab="ADOS",cex=2,pch=19)

message("Help_breathing_start-diagnosis")
## Help_breathing_start-diagnosis
wilcox.test(subset(x,Help_breathing_start==0)$Diagnosis,subset(x,Help_breathing_start==1)$Diagnosis)
## Warning in wilcox.test.default(subset(x, Help_breathing_start == 0)$Diagnosis,
## : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Help_breathing_start == 0)$Diagnosis and subset(x, Help_breathing_start == 1)$Diagnosis
## W = 42.5, p-value = 0.5311
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$Diagnosis,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$Diagnosis)
beeswarm(l,ylab="Diagnosis",cex=2,pch=19)

message("Help_breathing_start-srs")
## Help_breathing_start-srs
wilcox.test(subset(x,Help_breathing_start==0)$SRS_social_scores,subset(x,Help_breathing_start==1)$SRS_social_scores)
## 
##  Wilcoxon rank sum exact test
## 
## data:  subset(x, Help_breathing_start == 0)$SRS_social_scores and subset(x, Help_breathing_start == 1)$SRS_social_scores
## W = 38, p-value = 0.8916
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$SRS_social_scores,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$SRS_social_scores)
beeswarm(l,ylab="SRS",cex=2,pch=19)

message("Help_breathing_start-language")
## Help_breathing_start-language
wilcox.test(subset(x,Help_breathing_start==0)$language,subset(x,Help_breathing_start==1)$language)
## Warning in wilcox.test.default(subset(x, Help_breathing_start == 0)$language, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Help_breathing_start == 0)$language and subset(x, Help_breathing_start == 1)$language
## W = 32, p-value = 0.7414
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$language,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$language)
beeswarm(l,ylab="language",cex=2,pch=19)

message("Help_breathing_start-IQ")
## Help_breathing_start-IQ
wilcox.test(subset(x,Help_breathing_start==0)$IQ,subset(x,Help_breathing_start==1)$IQ)
## Warning in wilcox.test.default(subset(x, Help_breathing_start == 0)$IQ, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Help_breathing_start == 0)$IQ and subset(x, Help_breathing_start == 1)$IQ
## W = 28, p-value = 0.482
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$IQ,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$IQ)
beeswarm(l,ylab="IQ",cex=2,pch=19)

message("Help_breathing_start-famID")
## Help_breathing_start-famID
wilcox.test(subset(x,Help_breathing_start==0)$Family_ID,subset(x,Help_breathing_start==1)$Family_ID)
## Warning in wilcox.test.default(subset(x, Help_breathing_start == 0)$Family_ID,
## : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Help_breathing_start == 0)$Family_ID and subset(x, Help_breathing_start == 1)$Family_ID
## W = 44, p-value = 0.4804
## alternative hypothesis: true location shift is not equal to 0
l <- list("Help_breathing_start1"=subset(x,Help_breathing_start==0)$Family_ID,"Help_breathing_start2"=subset(x,Help_breathing_start==1)$Family_ID)
beeswarm(l,ylab="Family_ID",cex=2,pch=19)

Now look at birth complications (categorical).

table(x$Birth_complications)
## 
##  0  2  3 
## 14  2  2
message("birthmode-motorskills")
## birthmode-motorskills
wilcox.test(subset(x,Birth_complications==0)$Motor_skills,subset(x,Birth_complications>0)$Motor_skills)
## Warning in wilcox.test.default(subset(x, Birth_complications ==
## 0)$Motor_skills, : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_complications == 0)$Motor_skills and subset(x, Birth_complications > 0)$Motor_skills
## W = 26, p-value = 0.8601
## alternative hypothesis: true location shift is not equal to 0
l <- list("Birth_complications1"=subset(x,Birth_complications==0)$Motor_skills,"Birth_complications2"=subset(x,Birth_complications>0)$Motor_skills)
beeswarm(l,ylab="motor skills",cex=2,pch=19)

message("Birth_complications-ados")
## Birth_complications-ados
wilcox.test(subset(x,Birth_complications==0)$Social_interaction_on_ADOS,subset(x,Birth_complications>0)$Social_interaction_on_ADOS)
## Warning in wilcox.test.default(subset(x, Birth_complications ==
## 0)$Social_interaction_on_ADOS, : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_complications == 0)$Social_interaction_on_ADOS and subset(x, Birth_complications > 0)$Social_interaction_on_ADOS
## W = 30.5, p-value = 0.8312
## alternative hypothesis: true location shift is not equal to 0
l <- list("No_Birth_complications"=subset(x,Birth_complications==0)$Social_interaction_on_ADOS,"Birth_complications"=subset(x,Birth_complications>0)$Social_interaction_on_ADOS)
beeswarm(l,ylab="ADOS",cex=2,pch=19)

message("Birth_complications-diagnosis")
## Birth_complications-diagnosis
wilcox.test(subset(x,Birth_complications==0)$Diagnosis,subset(x,Birth_complications>0)$Diagnosis)
## Warning in wilcox.test.default(subset(x, Birth_complications == 0)$Diagnosis, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_complications == 0)$Diagnosis and subset(x, Birth_complications > 0)$Diagnosis
## W = 23.5, p-value = 0.6359
## alternative hypothesis: true location shift is not equal to 0
l <- list("No_Birth_complications"=subset(x,Birth_complications==0)$Diagnosis,"Birth_complications"=subset(x,Birth_complications>0)$Diagnosis)
beeswarm(l,ylab="Diagnosis",cex=2,pch=19)

message("Birth_complications-srs")
## Birth_complications-srs
wilcox.test(subset(x,Birth_complications==0)$SRS_social_scores,subset(x,Birth_complications>0)$SRS_social_scores)
## 
##  Wilcoxon rank sum exact test
## 
## data:  subset(x, Birth_complications == 0)$SRS_social_scores and subset(x, Birth_complications > 0)$SRS_social_scores
## W = 40, p-value = 0.2327
## alternative hypothesis: true location shift is not equal to 0
l <- list("No_Birth_complications"=subset(x,Birth_complications==0)$SRS_social_scores,"Birth_complications"=subset(x,Birth_complications>0)$SRS_social_scores)
beeswarm(l,ylab="SRS",cex=2,pch=19)

message("Birth_complications-language")
## Birth_complications-language
wilcox.test(subset(x,Birth_complications==0)$language,subset(x,Birth_complications>0)$language)
## Warning in wilcox.test.default(subset(x, Birth_complications == 0)$language, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_complications == 0)$language and subset(x, Birth_complications > 0)$language
## W = 35, p-value = 0.4871
## alternative hypothesis: true location shift is not equal to 0
l <- list("No_Birth_complications"=subset(x,Birth_complications==0)$language,"Birth_complications"=subset(x,Birth_complications>0)$language)
beeswarm(l,ylab="language",cex=2,pch=19)

message("Birth_complications-IQ")
## Birth_complications-IQ
wilcox.test(subset(x,Birth_complications==0)$IQ,subset(x,Birth_complications>0)$IQ)
## Warning in wilcox.test.default(subset(x, Birth_complications == 0)$IQ,
## subset(x, : cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_complications == 0)$IQ and subset(x, Birth_complications > 0)$IQ
## W = 33, p-value = 0.6324
## alternative hypothesis: true location shift is not equal to 0
l <- list("No_Birth_complications"=subset(x,Birth_complications==0)$IQ,"Birth_complications"=subset(x,Birth_complications>0)$IQ)
beeswarm(l,ylab="IQ",cex=2,pch=19)

message("Birth_complications-famID")
## Birth_complications-famID
wilcox.test(subset(x,Birth_complications==0)$Family_ID,subset(x,Birth_complications>0)$Family_ID)
## Warning in wilcox.test.default(subset(x, Birth_complications == 0)$Family_ID, :
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  subset(x, Birth_complications == 0)$Family_ID and subset(x, Birth_complications > 0)$Family_ID
## W = 8, p-value = 0.03747
## alternative hypothesis: true location shift is not equal to 0
l <- list("No_Birth_complications"=subset(x,Birth_complications==0)$Family_ID,"Birth_complications"=subset(x,Birth_complications>0)$Family_ID)
beeswarm(l,ylab="Family_ID",cex=2,pch=19)

Now look at gestational age (continuous).

x$gestational_age
##  [1] 35.0 35.0 36.0 36.0 36.0 36.0 36.7 36.7 36.4 36.4 34.0 34.0 37.0 37.0 38.0
## [16] 38.0 31.0 31.0
summary(x$gestational_age)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   31.00   35.00   36.00   35.57   36.70   38.00
hist(x$gestational_age)

message("gestational_age-motor_skills")
## gestational_age-motor_skills
mylm <- lm(x$Motor_skills ~ x$gestational_age)
summary(mylm)
## 
## Call:
## lm(formula = x$Motor_skills ~ x$gestational_age)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.9606 -0.8746 -0.3664  1.0983  1.1336 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)         1.4474     4.2897   0.337    0.740
## x$gestational_age  -0.0157     0.1204  -0.130    0.898
## 
## Residual standard error: 0.9925 on 16 degrees of freedom
## Multiple R-squared:  0.001062,   Adjusted R-squared:  -0.06137 
## F-statistic: 0.01701 on 1 and 16 DF,  p-value: 0.8979
plot(x$gestational_age,x$Motor_skills,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("gestational_age-ADOS")
## gestational_age-ADOS
mylm <- lm(x$Social_interaction_on_ADOS ~ x$gestational_age)
summary(mylm)
## 
## Call:
## lm(formula = x$Social_interaction_on_ADOS ~ x$gestational_age)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -11.6568  -2.7223   0.4504   3.5009   7.8344 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)       -21.2046    23.6842  -0.895    0.384
## x$gestational_age   0.9227     0.6649   1.388    0.184
## 
## Residual standard error: 5.48 on 16 degrees of freedom
## Multiple R-squared:  0.1074, Adjusted R-squared:  0.05163 
## F-statistic: 1.925 on 1 and 16 DF,  p-value: 0.1843
plot(x$gestational_age,x$Social_interaction_on_ADOS,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("gestational_age-Diagnosis")
## gestational_age-Diagnosis
mylm <- lm(x$Diagnosis ~ x$gestational_age)
summary(mylm)
## 
## Call:
## lm(formula = x$Diagnosis ~ x$gestational_age)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4345 -0.4315  0.5333  0.5937  0.7949 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)       -0.04244    3.44544  -0.012    0.990
## x$gestational_age  0.04024    0.09673   0.416    0.683
## 
## Residual standard error: 0.7972 on 16 degrees of freedom
## Multiple R-squared:  0.0107, Adjusted R-squared:  -0.05113 
## F-statistic: 0.1731 on 1 and 16 DF,  p-value: 0.6829
plot(x$gestational_age,x$Diagnosis,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("gestational_age-SRS")
## gestational_age-SRS
mylm <- lm(x$SRS_social_scores ~ x$gestational_age)
summary(mylm)
## 
## Call:
## lm(formula = x$SRS_social_scores ~ x$gestational_age)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -45.964 -27.520   1.928  26.757  49.350 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)       -118.105    142.330  -0.830    0.419
## x$gestational_age    5.422      3.996   1.357    0.194
## 
## Residual standard error: 32.93 on 16 degrees of freedom
## Multiple R-squared:  0.1032, Adjusted R-squared:  0.04714 
## F-statistic: 1.841 on 1 and 16 DF,  p-value: 0.1937
plot(x$gestational_age,x$SRS_social_scores,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("gestational_age-language")
## gestational_age-language
mylm <- lm(x$language ~ x$gestational_age)
summary(mylm)
## 
## Call:
## lm(formula = x$language ~ x$gestational_age)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -31.454 -25.532  -5.844  22.700  47.546 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)         35.941    119.319   0.301    0.767
## x$gestational_age    1.178      3.350   0.352    0.730
## 
## Residual standard error: 27.61 on 16 degrees of freedom
## Multiple R-squared:  0.007668,   Adjusted R-squared:  -0.05435 
## F-statistic: 0.1236 on 1 and 16 DF,  p-value: 0.7297
plot(x$gestational_age,x$language,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("gestational_age-IQ")
## gestational_age-IQ
mylm <- lm(x$IQ ~ x$gestational_age)
summary(mylm)
## 
## Call:
## lm(formula = x$IQ ~ x$gestational_age)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -27.140 -17.033  -4.493  16.943  30.007 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)
## (Intercept)        66.7420    84.8552   0.787    0.443
## x$gestational_age   0.3681     2.3823   0.155    0.879
## 
## Residual standard error: 19.63 on 16 degrees of freedom
## Multiple R-squared:  0.00149,    Adjusted R-squared:  -0.06092 
## F-statistic: 0.02387 on 1 and 16 DF,  p-value: 0.8791
plot(x$gestational_age,x$IQ,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

Now look at birthweight (continuous).

x$Birth_weight.g.
##  [1] 2112.000 2680.000 2240.000 3395.000 2220.000 2020.000 2400.000 1900.000
##  [9] 2400.000    2.500 1927.700 1814.000 2610.000 2684.000 2336.001 2630.840
## [17] 1551.000 1055.000
summary(x$Birth_weight.g.)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##     2.5  1906.9  2230.0  2109.9  2557.5  3395.0
hist(x$Birth_weight.g.)

message("birthweight-motor_skills")
## birthweight-motor_skills
mylm <- lm(x$Motor_skills ~ x$Birth_weight.g.)
summary(mylm)
## 
## Call:
## lm(formula = x$Motor_skills ~ x$Birth_weight.g.)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.2579 -0.9225 -0.1022  0.9625  1.1961 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)
## (Intercept)       0.2831048  0.7147223   0.396    0.697
## x$Birth_weight.g. 0.0002871  0.0003210   0.894    0.384
## 
## Residual standard error: 0.9691 on 16 degrees of freedom
## Multiple R-squared:  0.04763,    Adjusted R-squared:  -0.0119 
## F-statistic: 0.8001 on 1 and 16 DF,  p-value: 0.3843
plot(x$Birth_weight.g.,x$Motor_skills,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("Birth_weight.g.-ADOS")
## Birth_weight.g.-ADOS
mylm <- lm(x$Social_interaction_on_ADOS ~ x$Birth_weight.g.)
summary(mylm)
## 
## Call:
## lm(formula = x$Social_interaction_on_ADOS ~ x$Birth_weight.g.)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -11.0735  -2.4440   0.0454   3.7482   7.4738 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       8.248267   4.184711   1.971   0.0663 .
## x$Birth_weight.g. 0.001594   0.001879   0.848   0.4089  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.674 on 16 degrees of freedom
## Multiple R-squared:  0.04302,    Adjusted R-squared:  -0.01679 
## F-statistic: 0.7192 on 1 and 16 DF,  p-value: 0.4089
plot(x$Birth_weight.g.,x$Social_interaction_on_ADOS,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("Birth_weight.g.-Diagnosis")
## Birth_weight.g.-Diagnosis
mylm <- lm(x$Diagnosis ~ x$Birth_weight.g.)
summary(mylm)
## 
## Call:
## lm(formula = x$Diagnosis ~ x$Birth_weight.g.)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4618 -0.4078  0.3776  0.5503  0.8761 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)
## (Intercept)       0.8589519  0.5743249   1.496    0.154
## x$Birth_weight.g. 0.0002512  0.0002579   0.974    0.345
## 
## Residual standard error: 0.7787 on 16 degrees of freedom
## Multiple R-squared:  0.05595,    Adjusted R-squared:  -0.003053 
## F-statistic: 0.9483 on 1 and 16 DF,  p-value: 0.3447
plot(x$Birth_weight.g.,x$Diagnosis,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("Birth_weight.g.-SRS")
## Birth_weight.g.-SRS
mylm <- lm(x$SRS_social_scores ~ x$Birth_weight.g.)
summary(mylm)
## 
## Call:
## lm(formula = x$SRS_social_scores ~ x$Birth_weight.g.)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -65.168 -29.654   6.537  27.057  47.395 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       53.754892  25.042536   2.147   0.0475 *
## x$Birth_weight.g.  0.009938   0.011247   0.884   0.3900  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 33.96 on 16 degrees of freedom
## Multiple R-squared:  0.04653,    Adjusted R-squared:  -0.01306 
## F-statistic: 0.7808 on 1 and 16 DF,  p-value: 0.39
plot(x$Birth_weight.g.,x$SRS_social_scores,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("Birth_weight.g.-language")
## Birth_weight.g.-language
mylm <- lm(x$language ~ x$Birth_weight.g.)
summary(mylm)
## 
## Call:
## lm(formula = x$language ~ x$Birth_weight.g.)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -32.769 -26.230  -5.933  22.881  44.320 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)   
## (Intercept)       69.704267  20.326175   3.429  0.00344 **
## x$Birth_weight.g.  0.003853   0.009129   0.422  0.67859   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 27.56 on 16 degrees of freedom
## Multiple R-squared:  0.01101,    Adjusted R-squared:  -0.0508 
## F-statistic: 0.1781 on 1 and 16 DF,  p-value: 0.6786
plot(x$Birth_weight.g.,x$language,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

message("Birth_weight.g.-IQ")
## Birth_weight.g.-IQ
mylm <- lm(x$IQ ~ x$Birth_weight.g.)
summary(mylm)
## 
## Call:
## lm(formula = x$IQ ~ x$Birth_weight.g.)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -27.193 -17.236  -4.543  16.956  30.030 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       77.219510  14.474026   5.335  6.7e-05 ***
## x$Birth_weight.g.  0.001239   0.006500   0.191    0.851    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 19.63 on 16 degrees of freedom
## Multiple R-squared:  0.002265,   Adjusted R-squared:  -0.06009 
## F-statistic: 0.03632 on 1 and 16 DF,  p-value: 0.8513
plot(x$Birth_weight.g.,x$IQ,cex=2,pch=19)
abline(mylm,col="red",lty=2,lwd=2)

Session information

sessionInfo()
## R version 4.3.2 (2023-10-31)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.3 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Australia/Melbourne
## tzcode source: system (glibc)
## 
## attached base packages:
##  [1] grid      stats4    parallel  stats     graphics  grDevices utils    
##  [8] datasets  methods   base     
## 
## other attached packages:
##  [1] ggplot2_3.4.3                                      
##  [2] dplyr_1.1.3                                        
##  [3] tictoc_1.2                                         
##  [4] kableExtra_1.3.4                                   
##  [5] data.table_1.14.8                                  
##  [6] ENmix_1.36.03                                      
##  [7] doParallel_1.0.17                                  
##  [8] qqman_0.1.9                                        
##  [9] RCircos_1.2.2                                      
## [10] beeswarm_0.4.0                                     
## [11] forestplot_3.1.3                                   
## [12] abind_1.4-5                                        
## [13] checkmate_2.2.0                                    
## [14] reshape2_1.4.4                                     
## [15] gplots_3.1.3                                       
## [16] eulerr_7.0.0                                       
## [17] GEOquery_2.68.0                                    
## [18] RColorBrewer_1.1-3                                 
## [19] IlluminaHumanMethylation450kmanifest_0.4.0         
## [20] topconfects_1.16.0                                 
## [21] DMRcatedata_2.18.0                                 
## [22] ExperimentHub_2.8.1                                
## [23] AnnotationHub_3.8.0                                
## [24] BiocFileCache_2.8.0                                
## [25] dbplyr_2.3.3                                       
## [26] DMRcate_2.14.1                                     
## [27] limma_3.56.2                                       
## [28] missMethyl_1.34.0                                  
## [29] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1 
## [30] R.utils_2.12.2                                     
## [31] R.oo_1.25.0                                        
## [32] R.methodsS3_1.8.2                                  
## [33] plyr_1.8.8                                         
## [34] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0
## [35] minfi_1.46.0                                       
## [36] bumphunter_1.42.0                                  
## [37] locfit_1.5-9.8                                     
## [38] iterators_1.0.14                                   
## [39] foreach_1.5.2                                      
## [40] Biostrings_2.68.1                                  
## [41] XVector_0.40.0                                     
## [42] SummarizedExperiment_1.30.2                        
## [43] Biobase_2.60.0                                     
## [44] MatrixGenerics_1.12.3                              
## [45] matrixStats_1.0.0                                  
## [46] GenomicRanges_1.52.0                               
## [47] GenomeInfoDb_1.36.3                                
## [48] IRanges_2.34.1                                     
## [49] S4Vectors_0.38.1                                   
## [50] BiocGenerics_0.46.0                                
## [51] mitch_1.12.0                                       
## 
## loaded via a namespace (and not attached):
##   [1] DSS_2.48.0                    ProtGenerics_1.32.0          
##   [3] bitops_1.0-7                  httr_1.4.7                   
##   [5] webshot_0.5.5                 dynamicTreeCut_1.63-1        
##   [7] tools_4.3.2                   doRNG_1.8.6                  
##   [9] backports_1.4.1               utf8_1.2.3                   
##  [11] R6_2.5.1                      HDF5Array_1.28.1             
##  [13] lazyeval_0.2.2                Gviz_1.44.1                  
##  [15] rhdf5filters_1.12.1           permute_0.9-7                
##  [17] withr_2.5.0                   prettyunits_1.1.1            
##  [19] GGally_2.1.2                  gridExtra_2.3                
##  [21] base64_2.0.1                  preprocessCore_1.62.1        
##  [23] cli_3.6.1                     sass_0.4.7                   
##  [25] readr_2.1.4                   genefilter_1.82.1            
##  [27] askpass_1.2.0                 Rsamtools_2.16.0             
##  [29] systemfonts_1.0.4             foreign_0.8-85               
##  [31] siggenes_1.74.0               illuminaio_0.42.0            
##  [33] svglite_2.1.1                 dichromat_2.0-0.1            
##  [35] scrime_1.3.5                  BSgenome_1.68.0              
##  [37] readxl_1.4.3                  impute_1.74.1                
##  [39] rstudioapi_0.15.0             RSQLite_2.3.1                
##  [41] generics_0.1.3                BiocIO_1.10.0                
##  [43] gtools_3.9.4                  Matrix_1.6-1.1               
##  [45] interp_1.1-4                  fansi_1.0.4                  
##  [47] lifecycle_1.0.3               edgeR_3.42.4                 
##  [49] yaml_2.3.7                    rhdf5_2.44.0                 
##  [51] blob_1.2.4                    promises_1.2.1               
##  [53] crayon_1.5.2                  lattice_0.22-5               
##  [55] echarts4r_0.4.5               GenomicFeatures_1.52.2       
##  [57] annotate_1.78.0               KEGGREST_1.40.0              
##  [59] pillar_1.9.0                  knitr_1.44                   
##  [61] beanplot_1.3.1                rjson_0.2.21                 
##  [63] codetools_0.2-19              glue_1.6.2                   
##  [65] vctrs_0.6.3                   png_0.1-8                    
##  [67] cellranger_1.1.0              gtable_0.3.4                 
##  [69] assertthat_0.2.1              cachem_1.0.8                 
##  [71] xfun_0.40                     S4Arrays_1.0.6               
##  [73] mime_0.12                     survival_3.5-7               
##  [75] statmod_1.5.0                 interactiveDisplayBase_1.38.0
##  [77] ellipsis_0.3.2                nlme_3.1-163                 
##  [79] bit64_4.0.5                   bsseq_1.36.0                 
##  [81] progress_1.2.2                filelock_1.0.2               
##  [83] bslib_0.5.1                   nor1mix_1.3-0                
##  [85] KernSmooth_2.23-22            rpart_4.1.21                 
##  [87] colorspace_2.1-0              DBI_1.1.3                    
##  [89] Hmisc_5.1-1                   nnet_7.3-19                  
##  [91] tidyselect_1.2.0              bit_4.0.5                    
##  [93] compiler_4.3.2                curl_5.0.2                   
##  [95] rvest_1.0.3                   htmlTable_2.4.1              
##  [97] xml2_1.3.5                    RPMM_1.25                    
##  [99] DelayedArray_0.26.7           rtracklayer_1.60.1           
## [101] scales_1.2.1                  caTools_1.18.2               
## [103] quadprog_1.5-8                rappdirs_0.3.3               
## [105] stringr_1.5.0                 digest_0.6.33                
## [107] rmarkdown_2.24                htmltools_0.5.6              
## [109] pkgconfig_2.0.3               jpeg_0.1-10                  
## [111] base64enc_0.1-3               sparseMatrixStats_1.12.2     
## [113] highr_0.10                    fastmap_1.1.1                
## [115] ensembldb_2.24.0              rlang_1.1.1                  
## [117] htmlwidgets_1.6.2             shiny_1.7.5                  
## [119] DelayedMatrixStats_1.22.6     jquerylib_0.1.4              
## [121] jsonlite_1.8.7                BiocParallel_1.34.2          
## [123] mclust_6.0.0                  VariantAnnotation_1.46.0     
## [125] RCurl_1.98-1.12               magrittr_2.0.3               
## [127] Formula_1.2-5                 GenomeInfoDbData_1.2.10      
## [129] Rhdf5lib_1.22.1               munsell_0.5.0                
## [131] Rcpp_1.0.11                   stringi_1.7.12               
## [133] zlibbioc_1.46.0               MASS_7.3-60                  
## [135] org.Hs.eg.db_3.17.0           deldir_1.0-9                 
## [137] splines_4.3.2                 multtest_2.56.0              
## [139] hms_1.1.3                     rngtools_1.5.2               
## [141] geneplotter_1.78.0            biomaRt_2.56.1               
## [143] BiocVersion_3.17.1            XML_3.99-0.14                
## [145] evaluate_0.21                 calibrate_1.7.7              
## [147] latticeExtra_0.6-30           biovizBase_1.48.0            
## [149] BiocManager_1.30.22           tzdb_0.4.0                   
## [151] httpuv_1.6.11                 tidyr_1.3.0                  
## [153] openssl_2.1.0                 purrr_1.0.2                  
## [155] reshape_0.8.9                 xtable_1.8-4                 
## [157] restfulr_0.0.15               AnnotationFilter_1.24.0      
## [159] later_1.3.1                   viridisLite_0.4.2            
## [161] tibble_3.2.1                  memoise_2.0.1                
## [163] AnnotationDbi_1.62.2          GenomicAlignments_1.36.0     
## [165] cluster_2.1.4