Observed-data log-posterior for normal data
Evaluates the log of the observed-data posterior density at a user-supplied value of the parameter. Assumes a normal-inverted Wishart prior. This function is useful for monitoring the progress of EM and data augmentation.
logpost.norm(s, theta, prior)
s |
summary list of an incomplete normal data matrix created by the
function |
theta |
vector of normal parameters expressed on transformed scale in packed
storage, such as one produced by the function |
prior |
optional prior distribution. This is a list containing the
hyperparameters of a normal-inverted Wishart distribution. In order,
the elements of the list are: tau (a scalar), m (a scalar), mu0 (a
vector of length |
value of the observed-data log-posterior density
See Section 5.3.5 of Schafer (1996)
data(mdata) s <- prelim.norm(mdata) #do preliminary manipulations prior <- list(0,.5,rep(0,ncol(mdata)), .5*diag(rep(1,ncol(mdata)))) #ridge prior with .5 df thetahat <- em.norm(s,prior=prior) #compute posterior mode logpost.norm(s,thetahat,prior) #log-posterior at mode
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.