# Let consider the knowledge space and the parameters used in Brancaccio,
# de Chiusole, Stefanutti (2023) in Example 1
states<-matrix(c( 0,0,0,0,0,
0,0,0,0,1,
0,0,1,0,1,
0,0,0,1,1,
0,0,1,1,1,
1,0,1,0,1,
0,1,0,1,1,
1,0,1,1,1,
0,1,1,1,1,
1,1,0,1,1,
1,1,1,1,1), byrow=TRUE, ncol=5)
beta <-c(.004,.03,.02,.01,.007)
eta <-c(5e-06, 5e-05, 4e-05,.007,.08)
likelihood_0 <-rep(1,nrow(states))/nrow(states)
# Item asked
q = 3
# response observed
r_q = 1
likelihood_1 <- updating(likelihood_0,states,q,r_q,beta,eta)
Run the code above in your browser using DataLab