R/print.aov.ltm.R

print.aov.ltm <-
function (x, digits = 3, ...) {
    if (!inherits(x, "aov.ltm"))
        stop("Use only with 'aov.ltm' objects.\n")
    p.val <- round(x$p.value, 3)
    p.val <- if (p.val < 0.001) "<0.001" else p.val
    dat <- data.frame(AIC = round(c(x$aic0, x$aic1), 2), BIC = round(c(x$bic0, x$bic1), 2), 
                log.Lik = round(c(x$L0, x$L1), 2), LRT = c(" ", round(x$LRT, 2)), df = c("", x$df), 
                p.value = c("", p.val), row.names = c(x$nam0, x$nam1))
    cat("\n Likelihood Ratio Table\n")
    print(dat)
    cat("\n")
    invisible(x)
}

Try the ltm package in your browser

Any scripts or data that you put into this service are public.

ltm documentation built on March 18, 2022, 6:36 p.m.