-
Notifications
You must be signed in to change notification settings - Fork 0
/
NetworkComparisons.R
42 lines (34 loc) · 1.55 KB
/
NetworkComparisons.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Network Comparisons
load("ResultsbyProgram.RData")
load("ResultsbyAccreditation.RData")
library(ggplot2)
library(ggridges)
p1 <- ggplot(Centralities, aes(x = Eigen.vector, y = Level, fill = Level)) +
geom_density_ridges(alpha = 0.3) +
theme_ridges() +
theme(legend.position = "none") +
xlab("Eigenvector Centrality") +
ylab("Academic Program") +
theme(axis.text.x=element_text(size=35)) +
theme(axis.text.y=element_text(size=35)) +
theme(axis.title.x=element_text(face="italic", colour="black", size=35)) +
theme(axis.title.y=element_text(face="italic", colour="black", size=35))
p2 <- ggplot(Centralities2, aes(x = Eigen.vector, y = Accreditation, fill = Accreditation)) +
geom_density_ridges(alpha = 0.3) +
theme_ridges() +
theme(legend.position = "none") +
xlab("Eigenvector Centrality") +
ylab("Type of Accreditation") +
theme(axis.text.x=element_text(size=35)) +
theme(axis.text.y=element_text(size=35)) +
theme(axis.title.x=element_text(face="italic", colour="black", size=35)) +
theme(axis.title.y=element_text(face="italic", colour="black", size=35))
library(ggpubr)
ggarrange(p1, p2, labels = c("(A)", "(B)"), ncol = 1, nrow = 2)
library(psych)
ByProgram <- psych::describe.by(Centralities$Eigen.vector, group = Centralities$Level, mat = TRUE)
one.way <- aov(Eigen.vector ~ Level, data = Centralities)
summary(one.way)
ByAccreditation <- psych::describe.by(Centralities2$Eigen.vector, group = Centralities2$Accreditation, mat = TRUE)
one.way2 <- aov(Eigen.vector ~ Accreditation, data = Centralities2)
summary(one.way2)