\name{buildQMatrix} \alias{buildQMatrix} \title{Builds a Q-matrix from an Assessment Model Description.} \description{ This builds a Q Matrix from the output of getEMParametersForAMD or getLMParametersForAMD. } \usage{buildQMatrix(plist) } \arguments{ \item{plist}{A collection of parameter objects created from parsing an Assessment Model Description.} } \value{ A data frame whose rows correspond to observable outcome variables and whose columns contain key parameters. The first three columns give the name of the Evidence Model, Task (for Link Models) and observable. The next column give the task difficulty. Then follow a number of column corresponding to the proficiency variables. The entries in this column are the log of the slope parameter (if the proficiency is relevant for the obserevable) or zero (if not). Finally, a number of columns for the Difficulty Increment parameters are provided. } \details{ This function is the second part of building a Q-Matrix from an Assessment Model Description file. It takes the output of the \code{getEMParametersForAMD} or \code{getLMParametersForAMD} which is a list of parameter vector objects organized by model, and creates a Q-Matrix. Note that the entries in the Q-Matrix are the log slope parameters, and irrelevant proficiency variables are indicated by NAs. Note that only DiBello--Samejima family parameters are included in the Q-Matrix, hyper-Dirichlet type parameters are filtered out. } \author{Russell Almond} \note{Hyperdirichlet distributions are given NA values for corresponding row.} \seealso{ \code{\link{getEMParametersForAMD}},\code{\link{getLMParametersForAMD}}, \code{\link{buildVMatrix}} } \examples{ # Assumes StatShop is installed on Test Machine StatShop <- Sys.getenv("STATSHOP") if (StatShop == "") { warn("StatShop not installed, skipping test.") } else { fc <- paste(StatShop,"TestScripts","ICT","Version0","Hybrid","FixedContext", sep=.Platform$file.sep) ## This command finds the name of the AMD files in the current ## directory. Rest of the script assumes that the first one is the ## one you want to use. amds <- list.files(fc,"amd.xml$") amdfile <- paste(fc,amds[1],sep=.Platform$file.sep) ## This version of the command works with Assessment Model Description ## files (from Portal), it looks at evidence models. allemp <- getEMParametersForAMD(amdfile) ### This command builds the Q-Matrix QM <- buildQMatrix(allemp) ### This command writes it out. \dontrun{ write.table(QM,"QMatrix.csv",sep=",",eol="\r\n") } } } \keyword{interface}