loadModules is a function for creating multiple module objects from a specification sheet.

loadModules(fn, base_path = NULL, assessment_structure, examinee_list)

Arguments

fn

the full file path and name of a csv file containing module specifications.

base_path

(optional) the base path to be prepended to the file paths contained in the module specifications sheet.

assessment_structure

an assessment_structure object.

examinee_list

an examinee list from simExaminees. Used to determine the range of required modules.

Value

a module list containing module objects. Each module can be accessed using module_list[[grade]][[test]][[phase]].

Details

The module specification file is expected to have the following columns:

  • Grade a string containing the grade in the form G?, where ? is a number.

  • Phase a string containing the phase in the form P?, where ? is a number.

  • ItemPool the file path of a file that contains item pool data. This must be readable with loadItemPool.

  • ItemAttrib the file path of a file that contains item attribute data. This must be readable with loadItemAttrib.

  • PassageAttrib the file path of a file that contains passage attribute data. This must be readable with loadStAttrib.

  • Constraints the file path of a file that contains constraints data. This must be readable with loadConstraints.

Examples

assessment_structure <- createAssessmentStructure(
  n_test  = 3,
  n_phase = 2,
  route_limit_below = 0,
  route_limit_above = 2
)
examinee_list <- simExaminees(
  N             = 5,
  mean_v        = c(0, 0, 0),
  sd_v          = c(1, 1, 1),
  cor_v         = diag(1, 3),
  assessment_structure = assessment_structure
)

fn <- system.file("extdata", "module_definition_MATH_normal_N500_flexible.csv", package = "maat")
pkg_path <- system.file(package = "maat")
module_list <- loadModules(
  fn,
  base_path = pkg_path,
  assessment_structure = assessment_structure,
  examinee_list = examinee_list
)