setwd("~/Research/02b Neural Network Research UMR/Data + Analysis/Clustering_Xavier")
umr = read.csv("UMR_all_for_R_with_courses.csv",header = TRUE)
umr = umr[which(umr$Course_collected == "Biochem 1"),]
#gsub
umr[which(umr$Term_collected == "Fall2022"),]$Course_collected = gsub('Biochem 1', 'BiocF22', umr[which(umr$Term_collected == "Fall2022"),]$Course_collected)
umr[which(umr$Term_collected == "Fall2021"),]$Course_collected = gsub('Biochem 1', 'BiocF21', umr[which(umr$Term_collected == "Fall2021"),]$Course_collected)
umrs1 = umr[which(umr$Survey=="ES_Chemical_Reaction"),]
umrs2 = umr[which(umr$Survey=="ES_Glucosidase"),]
umrs3 = umr[which(umr$Survey=="Nucleic_Acids"),]
umrs4 = umr[which(umr$Survey=="Oxygen_Binding"),]
umrs5 = umr[which(umr$Survey=="Protein_Structure"),]
expert = read.csv("Experts_all_for_R.csv",header = TRUE)
exs1 = expert[which(expert$Survey=="ES_Chemical_Equation"),]
exs2 = expert[which(expert$Survey=="ES_Glucosidase"),]
exs3 = expert[which(expert$Survey=="Nucleic_Acids"),]
exs4 = expert[which(expert$Survey=="Oxygen_Binding"),]
exs5 = expert[which(expert$Survey=="Protein_Strcuture"),]library(psych)
analyzeUMRCourses = function(umrs1){
#allBiochem = data.frame(matrix(ncol = 8,nrow=0))
#myCols = c("Institution", "Course_collected", "Deidentifier","Sex_birth","Race_ethnicity","Coherency","PLC","NS")
#colnames(allBiochem) = myCols
#allBiochem = rbind(allBiochem,otherss1[myCols])
##remove UT/BIO206 and all Dennison and non-Bioc3321 at UMR
#allBiochem = allBiochem[! grepl("Dennison",allBiochem$Institution ),]
#allBiochem = allBiochem[! grepl("BIO206",allBiochem$Course_collected),]
#tempo = umrs1[grep("BIOC3321",umrs1$Course_collected),]
#allBiochem = rbind(allBiochem,tempo[myCols])
allBiochem = umrs1[,c("Institution", "Course_collected", "Deidentifier","Sex_birth","Race_ethnicity","Coherency","NS","actual_year","PLC")]
allBiochem$Coherency = as.numeric(allBiochem$Coherency)
allBiochem$NS = as.numeric(allBiochem$NS)
allBiochem$PLC = as.numeric(allBiochem$PLC)
allBiochem$race_binary <- ifelse(allBiochem$Race_ethnicity == "White/Caucasian" , 'White', "Non-white")
#Cluster. Setting one seed, whatever
set.seed(42)
df <- matrix(data=c(allBiochem$PLC,allBiochem$NS),ncol=2)
allBiochem$cluster = kmeans(scale(df[,1:2]),3)$cluster
#this is clumsy but I have to programmatically find the cluster number corresponding to HP, LP, and IP
#Using the PLC to make sure its working
meanPLCbyCluster = describeBy(allBiochem$PLC,allBiochem$cluster,mat=TRUE)
maxPLC = max(meanPLCbyCluster$mean)
HPgroup = as.numeric(meanPLCbyCluster[which(meanPLCbyCluster$mean==maxPLC),]$group1)
minPLC = min(meanPLCbyCluster$mean)
LPgroup = as.numeric(meanPLCbyCluster[which(meanPLCbyCluster$mean==minPLC),]$group1)
if (HPgroup + LPgroup == 3 ){IPgroup = 3}
if (HPgroup + LPgroup == 4 ){IPgroup = 2}
if (HPgroup + LPgroup == 5 ){IPgroup = 1}
allBiochem$clusterLetter = ifelse(allBiochem$cluster == HPgroup, "HP",
ifelse(allBiochem$cluster == LPgroup,"LP",
ifelse(allBiochem$cluster == IPgroup,"IP","Oops")))
allBiochem$Course_collected = factor(allBiochem$Course_collected,levels = c(
"BiocF21","BiocF22"))
return(allBiochem)
}
buildTables = function(allBiochem){
mata<-describeBy(allBiochem$PLC,allBiochem$clusterLetter,mat=TRUE,digits = 2)
print(knitr::kable(mata[,c(2,4,5,6,7,8,9,10,11,12)] , caption = "PLC by cluster group"))
mata<-describeBy(allBiochem$PLC,allBiochem$Institution,mat=TRUE,digits = 2)
print(knitr::kable(mata[,c(2,4,5,6,7,8,9,10,11,12)] , caption = "PLC by institution"))
mata<-describeBy(allBiochem$PLC,allBiochem$actual_year,mat=TRUE,digits = 2)
print(knitr::kable(mata[,c(2,4,5,6,7,8,9,10,11,12)] , caption = "PLC by Actual Year"))
mata<-describeBy(allBiochem$PLC,allBiochem$Course_collected,mat=TRUE,digits = 2)
print(knitr::kable(mata[,c(2,4,5,6,7,8,9,10,11,12)] , caption = "PLC by course"))
mata<-describeBy(allBiochem$PLC,allBiochem$Sex_birth,mat=TRUE,digits = 2)
print(knitr::kable(mata[,c(2,4,5,6,7,8,9,10,11,12)] , caption = "PLC by Sex"))
mata<-describeBy(allBiochem$PLC,allBiochem$race_binary,mat=TRUE,digits = 2)
print(knitr::kable(mata[,c(2,4,5,6,7,8,9,10,11,12)] , caption = "PLC by Race"))
}
calcStats = function(allBiochem,mycategory){
#using the term course as a generic category
for (course in unique(allBiochem$Course_collected)){
if ( course == "Expert") next
header = paste("<b>Results for category: ",course,"</b></br></br>")
cat(header)
umrTot= sum(allBiochem$Course_collected == course )
umrHP = sum(allBiochem$Course_collected == course & allBiochem$clusterLetter == "HP")
umrIP = sum(allBiochem$Course_collected == course & allBiochem$clusterLetter == "IP")
umrLP = sum(allBiochem$Course_collected == course & allBiochem$clusterLetter == "LP")
umrMale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Male")
umrHPmale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Male" & allBiochem$clusterLetter == "HP")
umrIPmale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Male" & allBiochem$clusterLetter == "IP")
umrLPmale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Male" & allBiochem$clusterLetter == "LP")
umrFemale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Female")
umrHPfemale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Female" & allBiochem$clusterLetter == "HP")
umrIPfemale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Female" & allBiochem$clusterLetter == "IP")
umrLPfemale = sum(allBiochem$Course_collected == course & allBiochem$Sex_birth == "Female" & allBiochem$clusterLetter == "LP")
umrWhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "White")
umrHPWhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "White" & allBiochem$clusterLetter == "HP")
umrIPWhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "White" & allBiochem$clusterLetter == "IP")
umrLPWhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "White" & allBiochem$clusterLetter == "LP")
umrNonwhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "Non-white")
umrHPNonwhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "Non-white" & allBiochem$clusterLetter == "HP")
umrIPNonwhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "Non-white" & allBiochem$clusterLetter == "IP")
umrLPNonwhite = sum(allBiochem$Course_collected == course & allBiochem$race_binary == "Non-white" & allBiochem$clusterLetter == "LP")
output = paste("<table >
<thead>
<tr>
<th colspan='2'></th>
<th colspan='2'>High Performers</th>
<th colspan='2'>Intermediate Performers</th>
<th colspan='2'>Low Performers</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan='5'>",course," </td>
<td>Total N=", umrTot,"</td>
<td colspan='2'>", signif(umrHP/umrTot*100,digits=2),"% </td>
<td colspan='2'>", signif(umrIP/umrTot*100,digits=2),"%</td>
<td colspan='2'>", signif(umrLP/umrTot*100,digits=2),"% </td>
</tr>
<tr>
<td rowspan='2'>Sex: males N=",umrMale,"; females N=",umrFemale,"</td>
<td>male</td>
<td>female</td>
<td>male</td>
<td>female</td>
<td>male</td>
<td>female</td>
</tr>
<tr>
<td>", signif(umrHPmale/umrMale*100,digits=2),"%</td>
<td>", signif(umrHPfemale/umrFemale*100,digits=2),"%</td>
<td>", signif(umrIPmale/umrMale*100,digits=2),"%</td>
<td>", signif(umrIPfemale/umrFemale*100,digits=2),"%</td>
<td>", signif(umrLPmale/umrMale*100,digits=2),"%</td>
<td>", signif(umrLPfemale/umrFemale*100,digits=2),"%</td>
</tr>
<tr>
<td rowspan='2'>Race: White N=",umrWhite,"; Non-white N=",umrNonwhite,"</td>
<td>white</td>
<td>non-white</td>
<td>white</td>
<td>non-white</td>
<td>white</td>
<td>non-white</td>
</tr>
<tr>
<td>", signif(umrHPWhite/umrWhite*100,digits=2),"%</td>
<td>", signif(umrHPNonwhite/umrNonwhite*100,digits=2),"%</td>
<td>", signif(umrIPWhite/umrWhite*100,digits=2),"%</td>
<td>", signif(umrIPNonwhite/umrNonwhite*100,digits=2),"%</td>
<td>", signif(umrLPWhite/umrWhite*100,digits=2),"%</td>
<td>", signif(umrLPNonwhite/umrNonwhite*100,digits=2),"%</td>
</tr>
</tbody>
</table> ")
cat(output)
}
}
calcStats2 = function(allBiochem,mycategory){
#using the term course as a generic category
for (course in unique(allBiochem$actual_year)){
if ( course == "Expert") next
header = paste("<b>Results for category: ",course,"</b></br></br>")
cat(header)
umrTot= sum(allBiochem$actual_year == course )
umrHP = sum(allBiochem$actual_year == course & allBiochem$clusterLetter == "HP")
umrIP = sum(allBiochem$actual_year == course & allBiochem$clusterLetter == "IP")
umrLP = sum(allBiochem$actual_year == course & allBiochem$clusterLetter == "LP")
umrMale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Male")
umrHPmale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Male" & allBiochem$clusterLetter == "HP")
umrIPmale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Male" & allBiochem$clusterLetter == "IP")
umrLPmale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Male" & allBiochem$clusterLetter == "LP")
umrFemale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Female")
umrHPfemale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Female" & allBiochem$clusterLetter == "HP")
umrIPfemale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Female" & allBiochem$clusterLetter == "IP")
umrLPfemale = sum(allBiochem$actual_year == course & allBiochem$Sex_birth == "Female" & allBiochem$clusterLetter == "LP")
umrWhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "White")
umrHPWhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "White" & allBiochem$clusterLetter == "HP")
umrIPWhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "White" & allBiochem$clusterLetter == "IP")
umrLPWhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "White" & allBiochem$clusterLetter == "LP")
umrNonwhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "Non-white")
umrHPNonwhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "Non-white" & allBiochem$clusterLetter == "HP")
umrIPNonwhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "Non-white" & allBiochem$clusterLetter == "IP")
umrLPNonwhite = sum(allBiochem$actual_year == course & allBiochem$race_binary == "Non-white" & allBiochem$clusterLetter == "LP")
output = paste("<table >
<thead>
<tr>
<th colspan='2'></th>
<th colspan='2'>High Performers</th>
<th colspan='2'>Intermediate Performers</th>
<th colspan='2'>Low Performers</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan='5'>",course," </td>
<td>Total N=", umrTot,"</td>
<td colspan='2'>", signif(umrHP/umrTot*100,digits=2),"% </td>
<td colspan='2'>", signif(umrIP/umrTot*100,digits=2),"%</td>
<td colspan='2'>", signif(umrLP/umrTot*100,digits=2),"% </td>
</tr>
<tr>
<td rowspan='2'>Sex: males N=",umrMale,"; females N=",umrFemale,"</td>
<td>male</td>
<td>female</td>
<td>male</td>
<td>female</td>
<td>male</td>
<td>female</td>
</tr>
<tr>
<td>", signif(umrHPmale/umrMale*100,digits=2),"%</td>
<td>", signif(umrHPfemale/umrFemale*100,digits=2),"%</td>
<td>", signif(umrIPmale/umrMale*100,digits=2),"%</td>
<td>", signif(umrIPfemale/umrFemale*100,digits=2),"%</td>
<td>", signif(umrLPmale/umrMale*100,digits=2),"%</td>
<td>", signif(umrLPfemale/umrFemale*100,digits=2),"%</td>
</tr>
<tr>
<td rowspan='2'>Race: White N=",umrWhite,"; Non-white N=",umrNonwhite,"</td>
<td>white</td>
<td>non-white</td>
<td>white</td>
<td>non-white</td>
<td>white</td>
<td>non-white</td>
</tr>
<tr>
<td>", signif(umrHPWhite/umrWhite*100,digits=2),"%</td>
<td>", signif(umrHPNonwhite/umrNonwhite*100,digits=2),"%</td>
<td>", signif(umrIPWhite/umrWhite*100,digits=2),"%</td>
<td>", signif(umrIPNonwhite/umrNonwhite*100,digits=2),"%</td>
<td>", signif(umrLPWhite/umrWhite*100,digits=2),"%</td>
<td>", signif(umrLPNonwhite/umrNonwhite*100,digits=2),"%</td>
</tr>
</tbody>
</table> ")
cat(output)
}
}
library(ggplot2)
library(ggpubr)
library(psych)
plotGGbox = function(df,myx,myy,mytitle,myylab){
df = df[complete.cases(df[[myy]]),]
maxy = max(df[[myy]])
ggboxplot(df, x = myx, y = myy,
title = mytitle,
color = myx, add = "jitter", legend="none",ylab = myylab) + rotate_x_text(angle = 45) +
geom_hline( yintercept = mean(df[[myy]]), linetype = 2) +
stat_compare_means(method = "anova", label.y = maxy*1.10) +
coord_cartesian(ylim = c(0, maxy*1.2)) +
stat_compare_means(label = "p.format", size=2.5, method = "t.test", ref.group = ".all.",label.y = maxy*1.05)
}
getAnova = function(df,myx,myy,mytitle,myylab){
#get anova
a<- TukeyHSD( aov(df[[myy]] ~ df[[myx]]))
b<-as.data.frame(a$`df[[myx]]`[,4])
colnames(b) = c("Testing statistical significance: p-values")
print(knitr::kable(b, caption = paste("Anova: ",mytitle)))
}
plotAndTable = function(df,myx,myy,mytitle,myylab){
if (myx=="Sex_birth" | myx=="race_binary"){
df = df[!grepl("(?i)Expert", df$Course_collected),]
df = df[!grepl("(?)Prefer not to answer",df$Sex_birth),]
}
print(plotGGbox(df,myx,myy,mytitle,myylab))
table = describeBy(df[[myy]],df[[myx]],mat=TRUE,digits = 2)
print(knitr::kable(table[,c(2,4,5,6,7,10,11,12)],caption=paste("Statistics of ",myylab," based on the category",myx)))
getAnova(df,myx,myy,mytitle,myylab)
}
addExperts = function(alldf, experts){
alldf = allBiochem
ex_new = as.data.frame( matrix( ncol=ncol(alldf),nrow = nrow(experts)) )
colnames(ex_new) = colnames(alldf)
#colnames(ex_new) = c("Institution", "Course_collected", "Deidentifier","Sex_birth","Race_ethnicity","Coherency","NS","actual_year","PLC","cluster","race_binary","clusterLeter")
ex_new[,1:12] = "Expert"
ex_new$PLC = experts$PLC
ex_new$NS = experts$NS
ex_new$Coherency = experts$Coherency
alldf=rbind(alldf,ex_new)
return(alldf)
}
library(dplyr)
library(corrplot)
plotChi = function(a){
#I need to use droplevels otherwise it was showing Expert with zeros as a ghost category?
b=chisq.test(table(droplevels(a)))
cat(paste("<p><b>The Chi-square analysis gives a p=",round(b$p.value,5),"</b></p>"))
cat(paste("<p><b>Residuals analysis:</b></p>"))
cat("A negative residual implies that the measured value is lower than expected and a positive value higher than expected</br>")
corrplot(b$residuals, is.cor = FALSE)
#normalize it
#contrib <- 100*b$residuals^2/b$statistic
#round(contrib, 3)
#corrplot(contrib, is.cor = FALSE)
#corrplot(contrib, is.cor = FALSE, col.lim = c(0.3,1) )
}
plotBarAndCorr = function(df,myx,myy,myxlabel,myylabel,mytitle){
#myx is the course or demographic variable, the independent variable
#myy is typically the clusterLetter, the dependent variable
#remove experts, not useful for the chisquare analysis
a = df[!grepl("Expert",df[,1]),]
if (myx=="Sex_birth"){
a = a[!grepl("(?)Prefer not to answer",a$Sex_birth),]
}
#select the two categorical variables
a = a[,c(myy,myx)]
print(plotBarCategories(a,myx,myy,myxlabel,myylabel,mytitle))
plotChi(a)
}
plotBarCategories = function(a,myx,myy,myxlabel,myylabel,mytitle){
#using aes_string instead of aes because colnames are variables
#ggplot(a, aes_string(x=myx,fill=myy)) + geom_bar()
#c=prop.table(table(a$clusterLetter))
#scales::percent(as.double(z))
#a %>% select(clusterLetter) %>% table() %>% prop.table() %>% as.double() %>% scales::percent()
#this one
#myx = enquo(myx)
#myy = enquo(myy)
a %>%
count(!!sym(myy),!!sym(myx)) %>%
group_by(!!sym(myx)) %>%
mutate(lab = paste0(round(prop.table(n) * 100, 2), '%')) %>%
ggplot(aes(!!sym(myx),n, fill=!!sym(myy))) +
geom_col() + geom_text(aes(label=lab),position='stack',vjust=1.5) +
labs(x=myxlabel,y=myylabel,title=mytitle)
}What was learned from “clustering_indeces_v2” analysis about indicators
Meaning of PLC and NS * PLC: path length correlation. How connected are two nodes. The closer to one more connected. Compared to expert. * NS: Neighborhood similarity. Compared to the experts.
First we will compare how PLC score is distributed among demographics and courses. Then we will combine students’ PLC and NS indexes as a measurement of students performance. We then cluster the PLC,NS pairs into three groups: Low performers, intermediate, and high performers. We then analyze the composition of those three groups by its demographics, year and courses.
We are comparing how the PLC score is significantly different among the different categories “Course collected”, “Student year”, “White/Non-white”, and “Sex at birth”
#
allBiochem = analyzeUMRCourses(umrs1)
allBiochem = addExperts(allBiochem,exs1)
#adding experts
#buildTables(allBiochem)
plotAndTable(allBiochem,"Course_collected","PLC","PLC: Course","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 58 | 0.40 | 0.18 | 0.45 | -0.18 | 0.67 | 0.85 |
| X12 | BiocF22 | 43 | 0.46 | 0.11 | 0.47 | 0.23 | 0.72 | 0.49 |
| X13 | Expert | 6 | 0.67 | 0.12 | 0.69 | 0.49 | 0.82 | 0.33 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.1008707 |
| Expert-BiocF21 | 0.0002044 |
| Expert-BiocF22 | 0.0065317 |
plotAndTable(allBiochem,"actual_year","PLC","PLC: Year","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 6 | 0.67 | 0.12 | 0.69 | 0.49 | 0.82 | 0.33 |
| X12 | third_year | 101 | 0.43 | 0.16 | 0.46 | -0.18 | 0.72 | 0.90 |
| Testing statistical significance: p-values |
|---|
| 0.0002908 |
plotAndTable(allBiochem,"race_binary","PLC","PLC: White/Non-white","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 41 | 0.39 | 0.20 | 0.45 | -0.18 | 0.72 | 0.90 |
| X12 | White | 60 | 0.45 | 0.12 | 0.46 | 0.05 | 0.67 | 0.62 |
| Testing statistical significance: p-values |
|---|
| 0.0557923 |
plotAndTable(allBiochem,"Sex_birth","PLC","PLC: Sex","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 78 | 0.42 | 0.15 | 0.46 | -0.07 | 0.67 | 0.74 |
| X12 | Male | 23 | 0.43 | 0.17 | 0.46 | -0.18 | 0.72 | 0.90 |
| Testing statistical significance: p-values |
|---|
| 0.7609849 |
plotAndTable(allBiochem,"Course_collected","NS","NS: Course","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 58 | 0.22 | 0.07 | 0.23 | 0.09 | 0.41 | 0.32 |
| X12 | BiocF22 | 43 | 0.24 | 0.07 | 0.25 | 0.13 | 0.42 | 0.29 |
| X13 | Expert | 6 | 0.37 | 0.11 | 0.34 | 0.28 | 0.57 | 0.29 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.3402447 |
| Expert-BiocF21 | 0.0000134 |
| Expert-BiocF22 | 0.0002297 |
plotAndTable(allBiochem,"actual_year","NS","NS: Year","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 6 | 0.37 | 0.11 | 0.34 | 0.28 | 0.57 | 0.29 |
| X12 | third_year | 101 | 0.23 | 0.07 | 0.24 | 0.09 | 0.42 | 0.33 |
| Testing statistical significance: p-values |
|---|
| 1.05e-05 |
plotAndTable(allBiochem,"race_binary","NS","NS: White/Non-white","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 41 | 0.22 | 0.07 | 0.20 | 0.09 | 0.41 | 0.32 |
| X12 | White | 60 | 0.24 | 0.07 | 0.24 | 0.10 | 0.42 | 0.33 |
| Testing statistical significance: p-values |
|---|
| 0.0679836 |
plotAndTable(allBiochem,"Sex_birth","NS","NS: Sex","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 78 | 0.23 | 0.07 | 0.23 | 0.09 | 0.42 | 0.33 |
| X12 | Male | 23 | 0.25 | 0.05 | 0.25 | 0.15 | 0.35 | 0.20 |
| Testing statistical significance: p-values |
|---|
| 0.1931804 |
The problem with clustering is that it is an iterative method and different “initial seeds” will yield to different results. It is only reproducible when the k-means method uses “set.seed(42)”
plotAndTable(allBiochem,"clusterLetter","PLC","PLC: Cluster letter","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 6 | 0.67 | 0.12 | 0.69 | 0.49 | 0.82 | 0.33 |
| X12 | HP | 39 | 0.51 | 0.08 | 0.51 | 0.27 | 0.63 | 0.37 |
| X13 | IP | 40 | 0.47 | 0.08 | 0.47 | 0.35 | 0.72 | 0.37 |
| X14 | LP | 22 | 0.19 | 0.14 | 0.25 | -0.18 | 0.32 | 0.50 |
| Testing statistical significance: p-values | |
|---|---|
| HP-Expert | 0.0012654 |
| IP-Expert | 0.0000680 |
| LP-Expert | 0.0000000 |
| IP-HP | 0.4335446 |
| LP-HP | 0.0000000 |
| LP-IP | 0.0000000 |
Are cluster groups unevenly distributed among these categories? A chi-square analysis will give us the probability that all three cluster groups (HP,IP,LP) contain statistically similar proportions of this category (course, year, sex, race…)
plotBarAndCorr(allBiochem,"Course_collected","clusterLetter","Course","N of students","High, Intermediate, Low Performance cluster")The Chi-square analysis gives a p= 0.06169
Residuals analysis:
A negative residual implies that the measured value is lower than
expected and a positive value higher than
expected
markerIntegers = as.integer(as.factor(allBiochem$Course_collected))
plot(allBiochem$PLC,allBiochem$NS,pch=allBiochem$clusterLetter,main = "ES_Chemical_Reaction - High(H), Intermediate(I), Low(L) performers",ylab="NS",xlab="PLC",col=markerIntegers)
legend("topleft", legend=unique(allBiochem$Course_collected), col=unique(markerIntegers), lty=1:1, cex=0.8)calcStats(allBiochem,"Course_collected")| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF21 | Total N= 58 | 31 % | 40 % | 29 % | |||
| Sex: males N= 18 ; females N= 40 | male | female | male | female | male | female | |
| 61 % | 18 % | 28 % | 45 % | 11 % | 38 % | ||
| Race: White N= 32 ; Non-white N= 26 | white | non-white | white | non-white | white | non-white | |
| 31 % | 31 % | 47 % | 31 % | 22 % | 38 % | ||
| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF22 | Total N= 43 | 49 % | 40 % | 12 % | |||
| Sex: males N= 5 ; females N= 38 | male | female | male | female | male | female | |
| 40 % | 50 % | 20 % | 42 % | 40 % | 7.9 % | ||
| Race: White N= 28 ; Non-white N= 15 | white | non-white | white | non-white | white | non-white | |
| 57 % | 33 % | 36 % | 47 % | 7.1 % | 20 % | ||
We are comparing how the PLC score is significantly different among the different categories “Course collected”, “Student year”, “White/Non-white”, and “Sex at birth”
#
allBiochem = analyzeUMRCourses(umrs2)
allBiochem = addExperts(allBiochem,exs2)
#buildTables(allBiochem)
plotAndTable(allBiochem,"Course_collected","PLC","PLC: Course","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 58 | 0.44 | 0.17 | 0.46 | -0.16 | 0.68 | 0.84 |
| X12 | BiocF22 | 43 | 0.47 | 0.10 | 0.48 | 0.24 | 0.65 | 0.41 |
| X13 | Expert | 8 | 0.72 | 0.09 | 0.70 | 0.59 | 0.82 | 0.23 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.4865706 |
| Expert-BiocF21 | 0.0000021 |
| Expert-BiocF22 | 0.0000399 |
plotAndTable(allBiochem,"actual_year","PLC","PLC: Year","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 8 | 0.72 | 0.09 | 0.70 | 0.59 | 0.82 | 0.23 |
| X12 | third_year | 101 | 0.45 | 0.15 | 0.47 | -0.16 | 0.68 | 0.84 |
| Testing statistical significance: p-values |
|---|
| 1.2e-06 |
plotAndTable(allBiochem,"race_binary","PLC","PLC: White/Non-white","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 41 | 0.42 | 0.19 | 0.48 | -0.16 | 0.65 | 0.81 |
| X12 | White | 60 | 0.47 | 0.10 | 0.47 | 0.25 | 0.68 | 0.43 |
| Testing statistical significance: p-values |
|---|
| 0.058725 |
plotAndTable(allBiochem,"Sex_birth","PLC","PLC: Sex","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 78 | 0.45 | 0.14 | 0.48 | -0.02 | 0.68 | 0.70 |
| X12 | Male | 23 | 0.44 | 0.17 | 0.46 | -0.16 | 0.65 | 0.81 |
| Testing statistical significance: p-values |
|---|
| 0.7177634 |
plotAndTable(allBiochem,"Course_collected","NS","NS: Course","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 58 | 0.25 | 0.09 | 0.26 | 0.04 | 0.45 | 0.41 |
| X12 | BiocF22 | 43 | 0.25 | 0.07 | 0.23 | 0.10 | 0.41 | 0.31 |
| X13 | Expert | 8 | 0.40 | 0.06 | 0.42 | 0.29 | 0.47 | 0.17 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.9840602 |
| Expert-BiocF21 | 0.0000070 |
| Expert-BiocF22 | 0.0000074 |
plotAndTable(allBiochem,"actual_year","NS","NS: Year","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 8 | 0.40 | 0.06 | 0.42 | 0.29 | 0.47 | 0.17 |
| X12 | third_year | 101 | 0.25 | 0.08 | 0.25 | 0.04 | 0.45 | 0.41 |
| Testing statistical significance: p-values |
|---|
| 1e-06 |
plotAndTable(allBiochem,"race_binary","NS","NS: White/Non-white","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 41 | 0.22 | 0.08 | 0.23 | 0.04 | 0.38 | 0.35 |
| X12 | White | 60 | 0.27 | 0.08 | 0.26 | 0.09 | 0.45 | 0.36 |
| Testing statistical significance: p-values |
|---|
| 0.0017559 |
plotAndTable(allBiochem,"Sex_birth","NS","NS: Sex","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 78 | 0.25 | 0.07 | 0.24 | 0.04 | 0.42 | 0.38 |
| X12 | Male | 23 | 0.27 | 0.10 | 0.26 | 0.04 | 0.45 | 0.41 |
| Testing statistical significance: p-values |
|---|
| 0.2450175 |
The problem with clustering is that it is an iterative method and different “initial seeds” will yield to different results. It is only reproducible when the k-means method uses “set.seed(42)”
plotAndTable(allBiochem,"clusterLetter","PLC","PLC: Cluster letter","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 8 | 0.72 | 0.09 | 0.70 | 0.59 | 0.82 | 0.23 |
| X12 | HP | 22 | 0.54 | 0.08 | 0.55 | 0.39 | 0.68 | 0.29 |
| X13 | IP | 55 | 0.49 | 0.08 | 0.50 | 0.28 | 0.65 | 0.37 |
| X14 | LP | 24 | 0.26 | 0.15 | 0.30 | -0.16 | 0.42 | 0.58 |
| Testing statistical significance: p-values | |
|---|---|
| HP-Expert | 0.0002500 |
| IP-Expert | 0.0000002 |
| LP-Expert | 0.0000000 |
| IP-HP | 0.1805068 |
| LP-HP | 0.0000000 |
| LP-IP | 0.0000000 |
plotBarAndCorr(allBiochem,"Course_collected","clusterLetter","Course","N of students","High, Intermediate, Low Performance cluster")The Chi-square analysis gives a p= 0.17887
Residuals analysis:
A negative residual implies that the measured value is lower than
expected and a positive value higher than
expected
markerIntegers = as.integer(as.factor(allBiochem$Course_collected))
plot(allBiochem$PLC,allBiochem$NS,pch=allBiochem$clusterLetter,main = "ES Glucosidase - High(H), Intermediate(I), Low(L) performers",ylab="NS",xlab="PLC",col=markerIntegers)
legend("topleft", legend=unique(allBiochem$Course_collected), col=unique(markerIntegers), lty=1:1, cex=0.8)calcStats(allBiochem,"Course_collected")| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF21 | Total N= 58 | 26 % | 47 % | 28 % | |||
| Sex: males N= 18 ; females N= 40 | male | female | male | female | male | female | |
| 28 % | 25 % | 50 % | 45 % | 22 % | 30 % | ||
| Race: White N= 32 ; Non-white N= 26 | white | non-white | white | non-white | white | non-white | |
| 34 % | 15 % | 47 % | 46 % | 19 % | 38 % | ||
| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF22 | Total N= 43 | 16 % | 65 % | 19 % | |||
| Sex: males N= 5 ; females N= 38 | male | female | male | female | male | female | |
| 20 % | 16 % | 40 % | 68 % | 40 % | 16 % | ||
| Race: White N= 28 ; Non-white N= 15 | white | non-white | white | non-white | white | non-white | |
| 21 % | 6.7 % | 68 % | 60 % | 11 % | 33 % | ||
We are comparing how the PLC score is significantly different among the different categories “Course collected”, “Student year”, “White/Non-white”, and “Sex at birth”
#
allBiochem = analyzeUMRCourses(umrs3)
allBiochem = addExperts(allBiochem,exs3)
#buildTables(allBiochem)
plotAndTable(allBiochem,"Course_collected","PLC","PLC: Course","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 53 | 0.14 | 0.15 | 0.14 | -0.17 | 0.56 | 0.72 |
| X12 | BiocF22 | 36 | 0.16 | 0.12 | 0.15 | -0.08 | 0.39 | 0.47 |
| X13 | Expert | 7 | 0.71 | 0.08 | 0.69 | 0.60 | 0.82 | 0.22 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.9031573 |
| Expert-BiocF21 | 0.0000000 |
| Expert-BiocF22 | 0.0000000 |
plotAndTable(allBiochem,"actual_year","PLC","PLC: Year","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 7 | 0.71 | 0.08 | 0.69 | 0.60 | 0.82 | 0.22 |
| X12 | third_year | 89 | 0.15 | 0.14 | 0.14 | -0.17 | 0.56 | 0.72 |
| Testing statistical significance: p-values |
|---|
| 0 |
plotAndTable(allBiochem,"race_binary","PLC","PLC: White/Non-white","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 36 | 0.14 | 0.16 | 0.11 | -0.09 | 0.56 | 0.64 |
| X12 | White | 53 | 0.16 | 0.12 | 0.16 | -0.17 | 0.40 | 0.56 |
| Testing statistical significance: p-values |
|---|
| 0.4662513 |
plotAndTable(allBiochem,"Sex_birth","PLC","PLC: Sex","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 70 | 0.14 | 0.13 | 0.14 | -0.09 | 0.56 | 0.64 |
| X12 | Male | 19 | 0.18 | 0.16 | 0.17 | -0.17 | 0.43 | 0.59 |
| Testing statistical significance: p-values |
|---|
| 0.3028995 |
plotAndTable(allBiochem,"Course_collected","NS","NS: Course","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 53 | 0.17 | 0.08 | 0.15 | 0.00 | 0.35 | 0.35 |
| X12 | BiocF22 | 36 | 0.17 | 0.07 | 0.18 | 0.03 | 0.30 | 0.27 |
| X13 | Expert | 7 | 0.43 | 0.08 | 0.44 | 0.33 | 0.53 | 0.20 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.9985811 |
| Expert-BiocF21 | 0.0000000 |
| Expert-BiocF22 | 0.0000000 |
plotAndTable(allBiochem,"actual_year","NS","NS: Year","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 7 | 0.43 | 0.08 | 0.44 | 0.33 | 0.53 | 0.20 |
| X12 | third_year | 89 | 0.17 | 0.08 | 0.15 | 0.00 | 0.35 | 0.35 |
| Testing statistical significance: p-values |
|---|
| 0 |
plotAndTable(allBiochem,"race_binary","NS","NS: White/Non-white","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 36 | 0.17 | 0.08 | 0.14 | 0.03 | 0.35 | 0.32 |
| X12 | White | 53 | 0.17 | 0.07 | 0.17 | 0.00 | 0.35 | 0.35 |
| Testing statistical significance: p-values |
|---|
| 0.861886 |
plotAndTable(allBiochem,"Sex_birth","NS","NS: Sex","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 70 | 0.17 | 0.08 | 0.16 | 0.00 | 0.35 | 0.35 |
| X12 | Male | 19 | 0.17 | 0.08 | 0.15 | 0.04 | 0.35 | 0.32 |
| Testing statistical significance: p-values |
|---|
| 0.8502301 |
The problem with clustering is that it is an iterative method and different “initial seeds” will yield to different results. It is only reproducible when the k-means method uses “set.seed(42)”
plotAndTable(allBiochem,"clusterLetter","PLC","PLC: Cluster letter","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 7 | 0.71 | 0.08 | 0.69 | 0.60 | 0.82 | 0.22 |
| X12 | HP | 16 | 0.32 | 0.10 | 0.33 | 0.16 | 0.56 | 0.39 |
| X13 | IP | 44 | 0.18 | 0.08 | 0.17 | 0.04 | 0.39 | 0.35 |
| X14 | LP | 29 | 0.01 | 0.07 | 0.02 | -0.17 | 0.13 | 0.29 |
| Testing statistical significance: p-values | |
|---|---|
| HP-Expert | 0e+00 |
| IP-Expert | 0e+00 |
| LP-Expert | 0e+00 |
| IP-HP | 1e-06 |
| LP-HP | 0e+00 |
| LP-IP | 0e+00 |
plotBarAndCorr(allBiochem,"Course_collected","clusterLetter","Course","N of students","High, Intermediate, Low Performance cluster")The Chi-square analysis gives a p= 0.96462
Residuals analysis:
A negative residual implies that the measured value is lower than
expected and a positive value higher than
expected
markerIntegers = as.integer(as.factor(allBiochem$Course_collected))
plot(allBiochem$PLC,allBiochem$NS,pch=allBiochem$clusterLetter,main = "Nucleic Acids - High(H), Intermediate(I), Low(L) performers",ylab="NS",xlab="PLC",col=markerIntegers)
legend("topleft", legend=unique(allBiochem$Course_collected), col=unique(markerIntegers), lty=1:1, cex=0.8)calcStats(allBiochem,"Course_collected")| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF21 | Total N= 53 | 19 % | 49 % | 32 % | |||
| Sex: males N= 15 ; females N= 38 | male | female | male | female | male | female | |
| 27 % | 16 % | 53 % | 47 % | 20 % | 37 % | ||
| Race: White N= 29 ; Non-white N= 24 | white | non-white | white | non-white | white | non-white | |
| 21 % | 17 % | 59 % | 38 % | 21 % | 46 % | ||
| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF22 | Total N= 36 | 17 % | 50 % | 33 % | |||
| Sex: males N= 4 ; females N= 32 | male | female | male | female | male | female | |
| 0 % | 19 % | 75 % | 47 % | 25 % | 34 % | ||
| Race: White N= 24 ; Non-white N= 12 | white | non-white | white | non-white | white | non-white | |
| 12 % | 25 % | 58 % | 33 % | 29 % | 42 % | ||
We are comparing how the PLC score is significantly different among the different categories “Course collected”, “Student year”, “White/Non-white”, and “Sex at birth”
#
allBiochem = analyzeUMRCourses(umrs4)
allBiochem = addExperts(allBiochem,exs4)
#buildTables(allBiochem)
plotAndTable(allBiochem,"Course_collected","PLC","PLC: Course","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 53 | 0.22 | 0.26 | 0.18 | -0.25 | 0.86 | 1.11 |
| X12 | BiocF22 | 37 | 0.20 | 0.13 | 0.20 | -0.04 | 0.42 | 0.46 |
| X13 | Expert | 15 | 0.69 | 0.13 | 0.66 | 0.52 | 0.89 | 0.38 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.8262867 |
| Expert-BiocF21 | 0.0000000 |
| Expert-BiocF22 | 0.0000000 |
plotAndTable(allBiochem,"actual_year","PLC","PLC: Year","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 15 | 0.69 | 0.13 | 0.66 | 0.52 | 0.89 | 0.38 |
| X12 | third_year | 90 | 0.21 | 0.21 | 0.19 | -0.25 | 0.86 | 1.11 |
| Testing statistical significance: p-values |
|---|
| 0 |
plotAndTable(allBiochem,"race_binary","PLC","PLC: White/Non-white","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 37 | 0.17 | 0.24 | 0.12 | -0.25 | 0.86 | 1.11 |
| X12 | White | 53 | 0.24 | 0.19 | 0.22 | -0.07 | 0.69 | 0.75 |
| Testing statistical significance: p-values |
|---|
| 0.1041397 |
plotAndTable(allBiochem,"Sex_birth","PLC","PLC: Sex","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 70 | 0.19 | 0.21 | 0.17 | -0.25 | 0.80 | 1.05 |
| X12 | Male | 20 | 0.28 | 0.23 | 0.26 | -0.06 | 0.86 | 0.92 |
| Testing statistical significance: p-values |
|---|
| 0.1067101 |
plotAndTable(allBiochem,"Course_collected","NS","NS: Course","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 53 | 0.21 | 0.09 | 0.21 | 0.06 | 0.44 | 0.38 |
| X12 | BiocF22 | 37 | 0.17 | 0.06 | 0.17 | 0.04 | 0.30 | 0.26 |
| X13 | Expert | 15 | 0.35 | 0.09 | 0.35 | 0.25 | 0.53 | 0.28 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.0601027 |
| Expert-BiocF21 | 0.0000001 |
| Expert-BiocF22 | 0.0000000 |
plotAndTable(allBiochem,"actual_year","NS","NS: Year","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 15 | 0.35 | 0.09 | 0.35 | 0.25 | 0.53 | 0.28 |
| X12 | third_year | 90 | 0.19 | 0.08 | 0.19 | 0.04 | 0.44 | 0.40 |
| Testing statistical significance: p-values |
|---|
| 0 |
plotAndTable(allBiochem,"race_binary","NS","NS: White/Non-white","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 37 | 0.19 | 0.09 | 0.19 | 0.05 | 0.39 | 0.34 |
| X12 | White | 53 | 0.20 | 0.08 | 0.19 | 0.04 | 0.44 | 0.40 |
| Testing statistical significance: p-values |
|---|
| 0.7257805 |
plotAndTable(allBiochem,"Sex_birth","NS","NS: Sex","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 70 | 0.19 | 0.07 | 0.19 | 0.04 | 0.38 | 0.34 |
| X12 | Male | 20 | 0.22 | 0.11 | 0.19 | 0.06 | 0.44 | 0.38 |
| Testing statistical significance: p-values |
|---|
| 0.1452473 |
The problem with clustering is that it is an iterative method and different “initial seeds” will yield to different results. It is only reproducible when the k-means method uses “set.seed(42)”
plotAndTable(allBiochem,"clusterLetter","PLC","PLC: Cluster letter","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 15 | 0.69 | 0.13 | 0.66 | 0.52 | 0.89 | 0.38 |
| X12 | HP | 13 | 0.56 | 0.16 | 0.55 | 0.30 | 0.86 | 0.56 |
| X13 | IP | 40 | 0.25 | 0.12 | 0.26 | 0.01 | 0.49 | 0.48 |
| X14 | LP | 37 | 0.04 | 0.12 | 0.05 | -0.25 | 0.31 | 0.56 |
| Testing statistical significance: p-values | |
|---|---|
| HP-Expert | 0.0361071 |
| IP-Expert | 0.0000000 |
| LP-Expert | 0.0000000 |
| IP-HP | 0.0000000 |
| LP-HP | 0.0000000 |
| LP-IP | 0.0000000 |
plotBarAndCorr(allBiochem,"Course_collected","clusterLetter","Course","N of students","High, Intermediate, Low Performance cluster")The Chi-square analysis gives a p= 0.00934
Residuals analysis:
A negative residual implies that the measured value is lower than
expected and a positive value higher than
expected
markerIntegers = as.integer(as.factor(allBiochem$Course_collected))
plot(allBiochem$PLC,allBiochem$NS,pch=allBiochem$clusterLetter,main = "Oxygen Binding - High(H), Intermediate(I), Low(L) performers",ylab="NS",xlab="PLC",col=markerIntegers)
legend("topleft", legend=unique(allBiochem$Course_collected), col=unique(markerIntegers), lty=1:1, cex=0.8)calcStats(allBiochem,"Course_collected")| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF21 | Total N= 53 | 23 % | 34 % | 43 % | |||
| Sex: males N= 16 ; females N= 37 | male | female | male | female | male | female | |
| 31 % | 19 % | 25 % | 38 % | 44 % | 43 % | ||
| Race: White N= 29 ; Non-white N= 24 | white | non-white | white | non-white | white | non-white | |
| 28 % | 17 % | 34 % | 33 % | 38 % | 50 % | ||
| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF22 | Total N= 37 | 2.7 % | 59 % | 38 % | |||
| Sex: males N= 4 ; females N= 33 | male | female | male | female | male | female | |
| 0 % | 3 % | 75 % | 58 % | 25 % | 39 % | ||
| Race: White N= 24 ; Non-white N= 13 | white | non-white | white | non-white | white | non-white | |
| 0 % | 7.7 % | 75 % | 31 % | 25 % | 62 % | ||
We are comparing how the PLC score is significantly different among the different categories “Course collected”, “Student year”, “White/Non-white”, and “Sex at birth”
#
allBiochem = analyzeUMRCourses(umrs5)
allBiochem = addExperts(allBiochem,exs5)
#buildTables(allBiochem)
plotAndTable(allBiochem,"Course_collected","PLC","PLC: Course","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 51 | 0.26 | 0.15 | 0.29 | -0.13 | 0.54 | 0.67 |
| X12 | BiocF22 | 35 | 0.27 | 0.13 | 0.27 | 0.01 | 0.51 | 0.51 |
| X13 | Expert | 7 | 0.76 | 0.10 | 0.79 | 0.59 | 0.89 | 0.30 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.9552617 |
| Expert-BiocF21 | 0.0000000 |
| Expert-BiocF22 | 0.0000000 |
plotAndTable(allBiochem,"actual_year","PLC","PLC: Year","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 7 | 0.76 | 0.10 | 0.79 | 0.59 | 0.89 | 0.30 |
| X12 | third_year | 86 | 0.26 | 0.14 | 0.28 | -0.13 | 0.54 | 0.67 |
| Testing statistical significance: p-values |
|---|
| 0 |
plotAndTable(allBiochem,"race_binary","PLC","PLC: White/Non-white","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 35 | 0.26 | 0.13 | 0.28 | -0.06 | 0.46 | 0.52 |
| X12 | White | 51 | 0.27 | 0.15 | 0.27 | -0.13 | 0.54 | 0.67 |
| Testing statistical significance: p-values |
|---|
| 0.8041316 |
plotAndTable(allBiochem,"Sex_birth","PLC","PLC: Sex","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 67 | 0.26 | 0.14 | 0.27 | -0.13 | 0.54 | 0.67 |
| X12 | Male | 19 | 0.26 | 0.16 | 0.31 | -0.03 | 0.48 | 0.51 |
| Testing statistical significance: p-values |
|---|
| 0.8295141 |
plotAndTable(allBiochem,"Course_collected","NS","NS: Course","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | BiocF21 | 51 | 0.17 | 0.07 | 0.17 | 0.04 | 0.33 | 0.29 |
| X12 | BiocF22 | 35 | 0.18 | 0.06 | 0.17 | 0.08 | 0.42 | 0.34 |
| X13 | Expert | 7 | 0.35 | 0.08 | 0.35 | 0.24 | 0.44 | 0.21 |
| Testing statistical significance: p-values | |
|---|---|
| BiocF22-BiocF21 | 0.7667017 |
| Expert-BiocF21 | 0.0000000 |
| Expert-BiocF22 | 0.0000001 |
plotAndTable(allBiochem,"actual_year","NS","NS: Year","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 7 | 0.35 | 0.08 | 0.35 | 0.24 | 0.44 | 0.21 |
| X12 | third_year | 86 | 0.18 | 0.06 | 0.17 | 0.04 | 0.42 | 0.38 |
| Testing statistical significance: p-values |
|---|
| 0 |
plotAndTable(allBiochem,"race_binary","NS","NS: White/Non-white","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Non-white | 35 | 0.17 | 0.07 | 0.17 | 0.04 | 0.29 | 0.24 |
| X12 | White | 51 | 0.18 | 0.07 | 0.17 | 0.08 | 0.42 | 0.34 |
| Testing statistical significance: p-values |
|---|
| 0.414361 |
plotAndTable(allBiochem,"Sex_birth","NS","NS: Sex","NS")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Female | 67 | 0.18 | 0.07 | 0.18 | 0.07 | 0.42 | 0.35 |
| X12 | Male | 19 | 0.16 | 0.06 | 0.15 | 0.04 | 0.29 | 0.24 |
| Testing statistical significance: p-values |
|---|
| 0.186288 |
The problem with clustering is that it is an iterative method and different “initial seeds” will yield to different results. It is only reproducible when the k-means method uses “set.seed(42)”
plotAndTable(allBiochem,"clusterLetter","PLC","PLC: Cluster letter","PLC")| group1 | n | mean | sd | median | min | max | range | |
|---|---|---|---|---|---|---|---|---|
| X11 | Expert | 7 | 0.76 | 0.10 | 0.79 | 0.59 | 0.89 | 0.30 |
| X12 | HP | 24 | 0.37 | 0.09 | 0.37 | 0.26 | 0.54 | 0.29 |
| X13 | IP | 39 | 0.30 | 0.08 | 0.29 | 0.16 | 0.48 | 0.32 |
| X14 | LP | 23 | 0.08 | 0.09 | 0.08 | -0.13 | 0.22 | 0.35 |
| Testing statistical significance: p-values | |
|---|---|
| HP-Expert | 0.0000000 |
| IP-Expert | 0.0000000 |
| LP-Expert | 0.0000000 |
| IP-HP | 0.0354329 |
| LP-HP | 0.0000000 |
| LP-IP | 0.0000000 |
plotBarAndCorr(allBiochem,"Course_collected","clusterLetter","Course","N of students","High, Intermediate, Low Performance cluster")The Chi-square analysis gives a p= 0.30345
Residuals analysis:
A negative residual implies that the measured value is lower than
expected and a positive value higher than
expected
markerIntegers = as.integer(as.factor(allBiochem$Course_collected))
plot(allBiochem$PLC,allBiochem$NS,pch=allBiochem$clusterLetter,main = "Protein Structure - High(H), Intermediate(I), Low(L) performers",ylab="NS",xlab="PLC",col=markerIntegers)
legend("topleft", legend=unique(allBiochem$Course_collected), col=unique(markerIntegers), lty=1:1, cex=0.8)calcStats(allBiochem,"Course_collected")| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF21 | Total N= 51 | 33 % | 39 % | 27 % | |||
| Sex: males N= 15 ; females N= 36 | male | female | male | female | male | female | |
| 33 % | 33 % | 33 % | 42 % | 33 % | 25 % | ||
| Race: White N= 28 ; Non-white N= 23 | white | non-white | white | non-white | white | non-white | |
| 36 % | 30 % | 36 % | 43 % | 29 % | 26 % | ||
| High Performers | Intermediate Performers | Low Performers | |||||
|---|---|---|---|---|---|---|---|
| BiocF22 | Total N= 35 | 20 % | 54 % | 26 % | |||
| Sex: males N= 4 ; females N= 31 | male | female | male | female | male | female | |
| 0 % | 23 % | 50 % | 55 % | 50 % | 23 % | ||
| Race: White N= 23 ; Non-white N= 12 | white | non-white | white | non-white | white | non-white | |
| 22 % | 17 % | 52 % | 58 % | 26 % | 25 % | ||