"Eve Corda" <[EMAIL PROTECTED]> writes:

> I would like to know how the BIC criterion is calculated for models estimated using 
> gls( ) function. I read in Pinheiro & Bates (2000) p84 that 
> BIC = -2logL + npar*log(N) (for the ML method), or
> BIC = -2logLR + npar*log(N-p) (for the REML method)
> but when I use any of these formulae I don't obtain the result given by R. 

> library(nlme)
Loading required package: lattice 
> getS3method("BIC", "gls")
function (object, ...) 
{
    if ((rt <- nargs()) > 1) {
        object <- list(object, ...)
        val <- lapply(object, logLik)
        val <- as.data.frame(t(sapply(val, function(el) c(attr(el, 
            "df"), BIC(el)))))
        names(val) <- c("df", "BIC")
        row.names(val) <- as.character(match.call()[-1])
        val
    }
    else {
        BIC(logLik(object))
    }
}
<environment: namespace:nlme>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to