From 9db8338d3a9240ed4685fcdd7aab9692031d5a04 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 18 Nov 2022 05:56:25 +0100 Subject: Improve logLik.mkinfit to attach nobs attribute The lack of that attribute lead to a failure to calculate the BIC in test_AIC.R on R-devel from yesterday. --- R/logLik.mkinfit.R | 1 + 1 file changed, 1 insertion(+) (limited to 'R') diff --git a/R/logLik.mkinfit.R b/R/logLik.mkinfit.R index 7cc10234..abf8517c 100644 --- a/R/logLik.mkinfit.R +++ b/R/logLik.mkinfit.R @@ -37,6 +37,7 @@ logLik.mkinfit <- function(object, ...) { val <- object$logLik # Number of estimated parameters attr(val, "df") <- length(object$bparms.optim) + length(object$errparms) + attr(val, "nobs") <- nobs(object) class(val) <- "logLik" return(val) } -- cgit v1.2.1