\name{drawEMParam} \alias{drawEMParam} \alias{lpriorEMParam} \title{Draws a value of the parameter set for an EvidenceModel } \description{ Each \code{\link{EvidenceModel}} object should contain a prior distribtion for its parameter object. The \code{drawEMParam} function draws a random set of values for the parameter object from that distribution. The \code{lpriorEMParam} function calculates the log of the prior probability of a given parameter. } \usage{ drawEMParam(em, background = NA, QQ=Q(em)) lpriorEMParam(em, param=parameters(em), background = NA, QQ=Q(em)) } \arguments{ \item{em}{ An object of class \code{\link{EvidenceModel}}. } \item{param}{ A set of parameters whose prior distribution is to be evaluated. } \item{background}{ An optional set of background (demographic) variables. Some evidence model types ignore background variables. } \item{QQ}{A Q-matrix to use (only needed if different from the one stored with the evidence model).} } \value{ The function \code{drawEMParam} parameter object of a class appropriate for use with the \code{em} argument. The function \code{lpriorEMParam} returns a scalar giving the log of the prior probability of the argument. } \references{ %% ~put references to the literature/web site here ~ } \author{Russell Almond} \seealso{ \code{\link{EvidenceModel}} } \examples{ Q <- matrix(c(1,0,1,1),2,2) em1 <- new("FixedQNormalEM", Q=Q, zMean=c(Mechanics=0,Fluency=0), zStd=diag(c(1,1)), Rmean=matrix(c(.7,.3,.3,.7),2,2), Rdf=3, hMean=c(1,1,.5), hStd=rep(.25,3)) em1.p1 <- drawEMParam(em1) lpriorEMParam(em1,em1.p1) } \keyword{ distribution } \keyword{ random }