\name{buildHyperDirichletDist} \alias{buildHyperDirichletDist} \title{Builds a hyper-Dirichlet distributon from a parameter table} \description{ This takes a data frame in which the factor columns represent the condition (parent) variables and the numeric columns represent states of the child variables and builds a hyper-Dirichlet distribution object. } \usage{ buildHyperDirichletDist(depVarName, parameterTable) } \arguments{ \item{depVarName}{A character vector of length one giving the dependent variable.} \item{parameterTable}{A data frame containing hyper-Dirichlet parameters (see Details).} } \details{ The \code{parameterTable} argument is a data frame in which each row represents the parameters of an independent Dirichlet distribution. Columns in the data frame which are factors are assumed to hold values for the parent (conditioning) variables. Columns in the data frame which are numeric are assumed to correspond to possible states of the child (dependent) variable. Most of the appropriate meta-data for the distribution object --- the names of the parent variables and the states of the child variable --- can be derivied from the parameter table. The remaining piece of information is the name of the dependent variable, which is given in \code{depVarName}. } \value{ An object of class \code{\link{distribution}} of type \dQuote{Hyperdirichlet Distribuiton} using \code{parameterTable} as its parameter table. } \author{Russell Almond} \section{Under Construction}{ StatShop supports an alternative format for the parameter table involving an extra \sQuote{Sum} and \sQuote{Scale} column (see \code{\link{scaleTable}}). This is not yet supported. } \seealso{\code{\link{getTableParents}}, \code{\link{distribution}}, \code{\link{scaleTable}} } \examples{ #conditional table X2.ptf <- data.frame(Theta=c("Expert","Novice"), correct=c(4,2), incorrect=c(2,4)) #Unconditional table Theta.ptf <- data.frame(Expert=3,Novice=3) Theta.dist <- buildHyperDirichletDist("Theta",Theta.ptf) X2.dist <- buildHyperDirichletDist("X2",rescaleTable(X2.ptf,100)) } \keyword{manip}