R/logLik.grm.R

logLik.grm <-
function (object, ...) {
    if (!inherits(object, "grm"))
        stop("Use only with 'grm' objects.\n")
    out <- object$log.Lik
    df <- sapply(object$coef, length)
    attr(out, "df") <- if (object$constrained) sum(df) - length(df) + 1 else sum(df)
    attr(out, "nobs") <- nrow(object$X)
    class(out) <- "logLik"
    out
}

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.