\name{gmModel} \alias{gmModel} \alias{toString.gmModel} \alias{print.gmModel} %- Also NEED an '\alias' for EACH other topic documented here. \title{A set of parameters for a StatShop GM model read from a file.} \description{ This is an object which corresponds to a Student, Evidence or Link model in StatShop. It contains a collection of variables and distributions, describing a graphical model. } \usage{ gmModel(id, taskID = character(0), type = "?"(length(taskID) > 0, "EM/LM":"SM"), variables = list(0), distributions = list(0)) print.gmModel(x, ...) toString.gmModel(x, ...) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{id}{ECD \code{StudentModelID} or \code{LinkID} for this model.} \item{taskID}{For Link and Evidence Models, ECD \code{taskID} for the corresponding Task (Model).} \item{type}{Either \code{"SM"} for Student Model or \code{"EM/LM"} for Evidence/Link Model.} \item{variables}{Collection of \code{varDescription} objects.} \item{distributions}{Collection of \code{distribution} objects.} \item{x}{Any \code{gmModel} object.} \item{\dots}{Arguments passed to print function} } \details{ This is normally built througth the \code{parseGmModel} function which reads the StatShop \code{gm.xml} file. } \value{ An object of class \code{gmModel}. } \references{ http://research.ets.org/~ralmond/StatShop/dataFormats.html } \author{Russell Almond} \seealso{ \code{\link{parseGmModel}}, \code{\link{varDescription}}, \code{\link{distribution}}, \code{\link{amd}}. } \examples{ #Student Model Theta.ptf <- data.frame(Expert=3,Novice=3) Theta <- varDescription("theta","theta",role="SM", levels=names(Theta.ptf)) Theta.dist <- buildHyperDirichletDist(Theta$name,Theta.ptf) lc2.sm <- gmModel("ecd://bninea/exMC/lc2/", type="SM", var=list(Theta), dist=list(Theta.dist)) #Evidence Model X2.ptf <- data.frame(Theta=c("Expert","Novice"), correct=c(4,2), incorrect=c(2,4)) X2 <- varDescription("X2","X2",role="Observable", levels=getTableStates(X2.ptf)) X2.dist <- buildHyperDirichletDist(X2$name,rescaleTable(X2.ptf,100)) mc.em <- gmModel("ecd://bninea/exMC/binary/","ecd://bninea/exMC/MC/", type="EM", var=list(Theta,X2), dist=list(X2.dist)) } \keyword{interface}