\name{FixedQNormalEM} \alias{FixedQNormalEM} \title{A multivariate normal observation evidence model with a fixed Q-matrix } \description{ This class represents a evidence model as a multivariate normal distribution conditioned on the latent proficiency vector. The Q-matrix, which describes which of the proficiency varaiables load on each of the observations is a fixed part of the evidence model. The parameter associated with this model is a \code{\link{FixedQNormalParam}}. The prior distributions of the three parameter components are independent: the mean vector has a normal prior and the covariance matrix has an inverse Wishert prior. } \usage{ FixedQNormalEM(...) } \arguments{ \item{\dots}{ The hyperparameters of the normal model. See details. } } \details{ This is an extension of \code{EvidenceModel} for cases where the observed variable follows a multivariate normal distribution, and the Q-matrix, which determines which proficiency variables load on which observable outcomes is fixed, in partciular, is will not be learned from data. (This makes it more like confirmatory than exploratory factor analysis). The structural parameter \code{Q} provides the Q-matrix, which has a zero value when the proficiency variable indicated by the column does not load on the observable variable indicated by the row. Let, \eqn{theta} be the value of the latent variables, and let \eqn{QH} be the matrix of loadings, \eqn{z} be the mean vector of the observables, and \eqn{R} be the covariance matrix. The observables are then distributed as \deqn{N(theta HQ^t +z, R)}. The matrix \eqn{HQ} is created by the elementwise multiplication of the loadings \code{H} (from the parameter) and the Q-matrix (from the model). The prior distribution for the parameters is \code{z ~ dnorm(zMean,zStd)}, \code{R ~ diwish(Rmean,Rdf)}, and \code{Hvec ~ dnorm(hMean,hStd)}, where \code{Hvec} is the vectorized version of the loadings created by removing the values corresponding to zero entries in the Q-matrix (see \code{\link{FixedQNormalParam}}). The six hyperparameters should be specified in the \ldots argument to the constructor function: \describe{ \item{zMean}{Mean of prior distribution for mean vector.} \item{zStd}{Covariance matrix of prior distribution for mean vector.} \item{Rmean}{Mean matrix of prior distribution for covariance matrix.} \item{Rdf}{Degrees of freedom for prior distribution for covariance matrix.} \item{hMean}{Mean of prior distribution for the vectorized loadings.} \item{hStd}{Covariance matrix of prior distribution for the vectorized loadings.} } This class ignores \code{background} variables. } \value{ An object of class \code{FixedQNormalEM}. } \references{ %% ~put references to the literature/web site here ~ } \author{Russell Almond} \seealso{ Methods: \code{\link{Q}}, \code{\link{nobserved}}, \code{\link{drawEMParam}}, \code{\link{drawObs}}, \code{\link{llikeObs}}, \code{optimalParams}, \code{\link{lpriorParam}} Superclass: \code{\link{EvidenceModel}} Subclasses: } \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)) stopifnot(nobserved(em1)==2L) em1.p1 <- drawEMParam(em1) lpriorEMParam(em1,em1.p1) ## The likelihood for observations is conditioned on a latent variable, ## so we need latent variable values for the next step. pm1 <- new("TimelessNormalPM", muMean=c(Mechanics=2,Fluency=2), varWeight=3, precMean=solve(matrix(c(.7,.3,.3,.7),2,2)), Sdf=3) pm1.p1 <- drawPMParam(pm1) pm1.stud10 <- drawInitialLatent(pm1,10,param=pm1.p1) em1.obs10 <- drawObs(em1,pm1.stud10,param=em1.p1) llikeObs(em1,em1.obs10,pm1.stud10,param=em1.p1) } \keyword{ class } \keyword{ distribution }