loglik.norm.RdEvaluates 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)value of the observed-data loglikelihood
See Section 5.3.5 of Schafer (1996)
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