datapages / irw

https://datapages.github.io/irw/
MIT License
1 stars 1 forks source link

visualization updates #6

Closed mcfrank closed 11 months ago

mcfrank commented 1 year ago
ben-domingue commented 1 year ago

a simple static plot available here: https://domingue-lab.slack.com/archives/C05T1H6MEH4/p1697230453276049

code as well:

load("florida_twins_behavior.Rdata")
unique(df$resp)
pvalue<-by(df$resp,df$item,mean,na.rm=TRUE)
hist(pvalue,xlim=range(df$resp,na.rm=TRUE),xlab='ctt p-value',ylab='',main='') 

ni<-length(unique(df$item))
L<-split(df,df$id)
n<-sapply(L,function(x) nrow(x)/ni)
z<-sapply(L,function(x) mean(x$resp,na.rm=TRUE))
plot(n,z,pch=19,cex=.5,xlab='proportion of items',ylab='average score')