# NOT RUN {
# Heterocitation in our graph
heterocitation(gr_sx, labels=labels, 1987, 2005)
### [1] "Sx ALL / ABM / IBM"
### [1] "0.047 / 0.214 / 0.007"
### [1] "Dx ALL / ABM / IBM"
### [1] "-0.927 / -0.690 / -0.982"
# Generate a baseline distribution for Dx values obtained through chance
# Here, we run 200 iterations of node corpus permutations
baseline<-MC_baseline_distribution(gr_sx, labels, 1987, 2018, 200)
# Assess whether our observed Dx is possibly due to chance
significance_Dx(-0.927, baseline[["Dx ALL"]])
### [1] "Distribution is normal. Performing t-test."
###
### One Sample t-test
###
### data: value - control
### t = -323.0017, df = 319, p-value < 2.2e-16
### alternative hypothesis: true mean is not equal to 0
### 95 percent confidence interval:
### -0.9159834 -0.9048923
### sample estimates:
### mean of x
### -0.9104379
###
### [1] "Glass' effect size: -18.0563442219448"
# }
Run the code above in your browser using DataLab