setupDefaultSR: Set up the Default Student Record for an StudentRecordSet

setupDefaultSRR Documentation

Set up the Default Student Record for an StudentRecordSet

Description

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.

Usage

setupDefaultSR(eng)

Arguments

eng

A BNEngine which contains the student record details.

Details

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:

  1. The student record set (eng$studentRecrods()) is cleared by calling clearSRs.

  2. A new blank student record (uid="*DEFAULT*") is created.

  3. The sm field of the new student record is initialized to the proficiency model.

  4. The student model is compiled (PnetCompile).

  5. The baseline statisics are calculated (updateStats).

  6. The baseline history is set (baselineHist).

  7. The default student record is saved in the defaultSR field of the StudentRecordSet and in the database (saveSR).

  8. The baseline statistics are announced (announceStats).

Value

This function is called for its side effects.

Author(s)

Russell Almond

References

Almond, Mislevy, Steinberg, Yan and Williamson (2015). Bayesian Networks in Educational Assessment. Springer. Especially Chapter 13.

See Also

Classes: BNEngine, StudentRecord, StudentRecordSet, PnetWarehouse

Functions: clearSRs, PnetCompile, updateStats, baselineHist, saveSR, announceStats

Examples



## 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)



ralmond/EABN documentation built on Aug. 30, 2023, 12:52 p.m.