ben-domingue / irw

Code related to data for the Item Response Warehouse
https://datapages.github.io/irw/
4 stars 7 forks source link

Accelerating Early Math Learning with Research-Based Personalized Learning Games: A Cluster Randomized Controlled Trial #65

Open ben-domingue opened 3 months ago

ben-domingue commented 3 months ago

JREE paper. need to determine if data is reported at item-level

https://www.tandfonline.com/doi/full/10.1080/19345747.2021.1969710

rn2407stanford commented 1 month ago

Student Assessment Data.xlsx

library(readxl)
df <- read_excel("Student Assessment Data.xlsx"); df

control_pretest=df[df$Condition=="Control", 23:102]; control_pretest
control_posttest=df[df$Condition=="Control", 114:193] ; control_posttest
treatment_pretest=df[df$Condition=="Treatment", 23:102] ; treatment_pretest
treatment_posttest=df[df$Condition=="Treatment",  114:193] ; treatment_posttest

x=control_pretest
id<-1:nrow(x)
L<-list()
for (i in 1:ncol(x)) L[[i]]<-data.frame(id=id, item=colnames(x)[i], resp=x[,i])
for (i in 1:ncol(x)) colnames(L[[i]])<-c("id", "item", "resp")
df<-data.frame(do.call("rbind",L))
save(df,file='control_pretest.Rdata')

x=control_posttest
id<-1:nrow(x)
L<-list()
for (i in 1:ncol(x)) L[[i]]<-data.frame(id=id, item=colnames(x)[i], resp=x[,i])
for (i in 1:ncol(x)) colnames(L[[i]])<-c("id", "item", "resp")
df<-data.frame(do.call("rbind",L))
save(df,file='control_posttest.Rdata')

x=treatment_pretest
id<-1:nrow(x)
L<-list()
for (i in 1:ncol(x)) L[[i]]<-data.frame(id=id, item=colnames(x)[i], resp=x[,i])
for (i in 1:ncol(x)) colnames(L[[i]])<-c("id", "item", "resp")
df<-data.frame(do.call("rbind",L))
save(df,file='treatment_pretest.Rdata')

x=treatment_posttest
id<-1:nrow(x)
L<-list()
for (i in 1:ncol(x)) L[[i]]<-data.frame(id=id, item=colnames(x)[i], resp=x[,i])
for (i in 1:ncol(x)) colnames(L[[i]])<-c("id", "item", "resp")
df<-data.frame(do.call("rbind",L))
save(df,file='treatment_posttest.Rdata')
rn2407stanford commented 1 month ago

This one has Control, Treatment, Pretest, Posttest. How am I supposed to do?

What I did is that I separated into four datasets and then made it into long form. control_pretest, control_posttest, treatment_pretest, and treatment_posttest. But not sure it is correct.

ben-domingue commented 1 month ago

this is great! two things:

  1. are the pretest and posttest measures the same?
  2. set up a 'treatment' column that is 1 if respondent is treated and 0 otherwise.
rn2407stanford commented 1 month ago
  1. I am not sure the article Explicitly says whether measurement instruments are the same or not. But, they seem to be the same from how it is described. Maybe I can add another 1 and 0 for postest and pretest?
ben-domingue commented 2 weeks ago

hi @rn2407stanford let's do the following.