R/logLik.rasch.R

logLik.rasch <-
function (object, ...) {
    if (!inherits(object, "rasch"))
        stop("Use only with 'rasch' objects.\n")
    out <- object$log.Lik
    attr(out, "df") <- if (!is.null(constr <- object$constraint))
        nrow(object$coef) + 1 - nrow(constr) else nrow(object$coef) + 1
    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.