fit.em <- eglhmm(y~locn+depth,data=SydColCount,distr="P",
cells=c("locn","depth"),K=2,method="em",verb=TRUE)
gh.em <- postHocGradHess(fit.em) # Calculates using inclTau=TRUE.
if (FALSE) {
gh.em.noTau <- postHocGradHess(fit.em,inclTau=FALSE)
fit.lm <- eglhmm(y~locn+depth,data=SydColCount,distr="P",
cells=c("locn","depth"),K=2,verb=TRUE)
gh.lm <- postHocGradHess(fit.lm) # Just extracts the relevant components.
gh.lm.noTau <- postHocGradHess(fit.lm,inclTau=FALSE)
fit.bf <- eglhmm(y~locn+depth,data=SydColCount,distr="P",
cells=c("locn","depth"),K=2,method="bf",verb=TRUE,
hessian=TRUE)
gh.bf <- postHocGradHess(fit.bf) # Calculates using inclTau=TRUE; also
# extracts numerically computed quantities.
gh.bf.noTau <- postHocGradHess(fit.bf,inclTau=FALSE) # Calculates; also
# extracts numerically
# computed quantities.
}
Run the code above in your browser using DataLab