dexter-psychometrics / dexter

Management, assessment, and psychometric analysis of data from educational and psychological tests
GNU Lesser General Public License v3.0
8 stars 5 forks source link

Code not running in the vignette about equating #13

Closed JulienMouchninoCCI closed 1 month ago

JulienMouchninoCCI commented 2 months ago

In the vignette about equating, the code can't run because the ts object is not defined.

prob_pass = tp = rep(0,29)
for (i in seq_along(0:28)){
  prob_pass[i] = sum(ts$ref_test[ts$new_test==i]>=10) / sum(ts$new_test==i)
  tp[i] = sum(ts$ref_test[ts$new_test>=i]>=10) / sum(ts$new_test>=i)
}
plot(0:28, prob_pass, ylab="Proportion passing the reference test", xlab="New test score", ylim=c(0,1), type = "o", col="red",bty='l')
lines(0:28, tp, type="o", lty=2, col="blue")

EDIT : Was the code provided just to illustrate the chart, so is it not meant to be run?

jessekps commented 2 months ago

This code is meant as an illustration of what the package actually does internally. It is not really meant to be used but nevertheless, all visible code should be complete in and of itself and not depend on objects created behind the scenes. I probably hid a bit more of the code than I should have. I will have a look, tnx for the report.

jessekps commented 1 month ago

unhidden creation of data.frame ts