Evaluates the observed-data loglikelihood function at a user-supplied value of the parameter. This function is useful for monitoring the progress of EM and data augmentation.

loglik.norm(s, theta)

Arguments

s

summary list of an incomplete normal data matrix created by the function prelim.norm.

theta

vector of normal parameters expressed on transformed scale in packed storage, such as one produced by the function em.norm.

Value

value of the observed-data loglikelihood

References

See Section 5.3.5 of Schafer (1996)

See also

Examples

data(mdata)
s <- prelim.norm(mdata)   #do preliminary manipulations
thetahat <- em.norm(s)   #compute MLE
#> Iterations of EM: 
#> 1...2...3...4...5...6...7...8...9...10...11...12...13...14...15...16...17...
loglik.norm(s,thetahat)  #loglikelihood at the MLE
#> [1] -21.62696