aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-11-18 05:56:25 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-11-18 05:59:02 +0100
commit9db8338d3a9240ed4685fcdd7aab9692031d5a04 (patch)
tree4874d2ec8adf40e6361b2ce1ae3c7af09426362b /R
parent549baaa3cef90ee9f256b14531d4de40d5131dc0 (diff)
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.
Diffstat (limited to 'R')
-rw-r--r--R/logLik.mkinfit.R1
1 files changed, 1 insertions, 0 deletions
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)
}

Contact - Imprint