diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2022-11-18 05:56:25 +0100 |
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-11-18 05:59:02 +0100 |
| commit | 9db8338d3a9240ed4685fcdd7aab9692031d5a04 (patch) | |
| tree | 4874d2ec8adf40e6361b2ce1ae3c7af09426362b /R | |
| parent | 549baaa3cef90ee9f256b14531d4de40d5131dc0 (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.R | 1 |
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) } |
