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.1 (2023-06-16)
## 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/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 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: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] beeswarm_0.4.0     ggplot2_3.4.4      gplots_3.1.3       RColorBrewer_1.1-3
## [5] dplyr_1.1.3        kableExtra_1.3.4  
## 
## loaded via a namespace (and not attached):
##  [1] gtable_0.3.4       jsonlite_1.8.7     highr_0.10         compiler_4.3.1    
##  [5] gtools_3.9.4       webshot_0.5.5      tidyselect_1.2.0   xml2_1.3.5        
##  [9] stringr_1.5.0      bitops_1.0-7       jquerylib_0.1.4    systemfonts_1.0.4 
## [13] scales_1.2.1       yaml_2.3.7         fastmap_1.1.1      R6_2.5.1          
## [17] generics_0.1.3     knitr_1.43         tibble_3.2.1       munsell_0.5.0     
## [21] svglite_2.1.2      bslib_0.5.1        pillar_1.9.0       rlang_1.1.1       
## [25] utf8_1.2.3         cachem_1.0.8       stringi_1.7.12     xfun_0.40         
## [29] caTools_1.18.2     sass_0.4.7         viridisLite_0.4.2  cli_3.6.1         
## [33] withr_2.5.0        magrittr_2.0.3     grid_4.3.1         digest_0.6.33     
## [37] rvest_1.0.3        rstudioapi_0.15.0  lifecycle_1.0.3    vctrs_0.6.3       
## [41] KernSmooth_2.23-22 evaluate_0.21      glue_1.6.2         fansi_1.0.4       
## [45] colorspace_2.1-0   rmarkdown_2.24     httr_1.4.7         tools_4.3.1       
## [49] pkgconfig_2.0.3    htmltools_0.5.6