setupDefaultSR | R Documentation |
The default student record is a field associated with a
StudentRecordSet
which provides a template
student record for a student just staring the assessment. The
setupDefaultSR
function needs to be called at the start of
every scoring session to initialize the defaultSR
field of the
student record set.
setupDefaultSR(eng)
eng |
A |
This function creates a new StudentRecord
object
with the special uid
“*DEFAULT*” and the special
context
ID “*Baseline*”. The student model is
actually the competency or proficiency model: the baseline student
model giving the population distribution of the the measured
proficiencies. This is fetched by name from the
PnetWarehouse
attached to the engine; the name
is given in the profModel
field of the eng
.
Setting up a default student record actually takes a number of steps:
The student record set (eng$studentRecrods()
) is
cleared by calling clearSRs
.
A new blank student record (uid="*DEFAULT*"
) is
created.
The sm
field of the new student record is
initialized to the proficiency model.
The student model is compiled
(PnetCompile
).
The baseline statisics are calculated
(updateStats
).
The baseline history is set
(baselineHist
).
The default student record is saved in the defaultSR
field of the StudentRecordSet
and in the
database (saveSR
).
The baseline statistics are announced
(announceStats
).
This function is called for its side effects.
Russell Almond
Almond, Mislevy, Steinberg, Yan and Williamson (2015). Bayesian Networks in Educational Assessment. Springer. Especially Chapter 13.
Classes:
BNEngine
, StudentRecord
,
StudentRecordSet
, PnetWarehouse
Functions:
clearSRs
, PnetCompile
,
updateStats
, baselineHist
,
saveSR
, announceStats
## Requires PNetica
library(PNetica) ## Must load to setup Netica DLL
app <- "ecd://epls.coe.fsu.edu/EITest"
sess <- RNetica::NeticaSession()
RNetica::startSession(sess)
config.dir <- file.path(library(help="Peanut")$path, "auxdata")
net.dir <- file.path(library(help="PNetica")$path,"testnets")
netman <- read.csv(file.path(config.dir, "Mini-PP-Nets.csv"),
row.names=1, stringsAsFactors=FALSE)
stattab <- read.csv(file.path(config.dir, "Mini-PP-Statistics.csv"),
as.is=TRUE)
Nethouse <- PNetica::BNWarehouse(netman,session=sess,
address=net.dir)
cl <- new("CaptureListener")
listeners <- list("cl"=cl)
ls <- ListenerSet(sender= paste("EAEngine[",app,"]"),
db=MongoDB(noMongo=TRUE), listeners=listeners)
eng <- newBNEngineNDB(app=app,warehouse=Nethouse,
listenerSet=ls,manifest=netman,
profModel="miniPP_CM",
histNodes="Physics",
statmat=stattab,
activeTest="EAActive.txt")
## Standard initialization methods.
loadManifest(eng,netman)
eng$setHistNodes("Physics")
configStats(eng,stattab)
setupDefaultSR(eng)
defrec <- eng$studentRecords()$defaultSR
stopifnot(uid(defrec)=="*DEFAULT*", app(defrec)==app(eng),
context(defrec)=="*Baseline*",
PnetName(sm(defrec))==eng$profModel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.