\name{reportVariablesAsDemographics} \alias{reportVariablesAsDemographics} \title{Generates DemographicVariableMeta objects for variables in model} \usage{ reportVariablesAsDemographics(sm, codeRule=NULL) } \arguments{ \item{sm}{A \code{\link{gmModel}} object containing a Student Model.} \item{codeRule}{Integer or \code{NULL} describing how observables are to be coded, see \code{\link{integerCodes}}.} } \description{ This generates dummy demographic variables (as \code{DemographicVariableMeta} objects) for the variables in a proficiency model. This follows the convention of the StatShop simulator of outputing the simulated proficiency variables as demographic variables. } \details{ StatShop codes the generated variables as \code{\emph{modelName}.\emph{varName}} and this function uses the same convention. The \code{codeRule} argument is passed to \code{\link{integerCodes}} and is used to control how the proficiency variables are coded in the CSV file. } \value{ A list of \code{\link{DemographicVariableMeta}} objects corresponding to the variables of \code{sm}. } \references{ http://research.ets.org/~ralmond/StatShop/dataFormats.html } \seealso{ \code{\link{integerCodes}}, \code{\link{gmModel}}, \code{\link{DemographicVariableMeta}} } \examples{ # Assumes StatShop is installed on the test machine. StatShop <- Sys.getenv("STATSHOP") if (StatShop == "") { warn("StatShop not installed, skipping test.") } else { ## Find the test directory amdfile <- file.path(StatShop,"TestScripts","EMSM", "EMSM.amd.xml") emsm.ad <- parseAMD(amdfile) sm1 <- emsm.ad$studentModels[[1]] simdemos <- reportVariablesAsDemographics(sm1) \dontshow{ stopifnot(length(simdemos) == 3, all.equal(sort(names(simdemos)), c("Skill1","Skill2","Skill3")) ) } } } \keyword{interface}