Last active
June 19, 2024 08:27
logLik.plm function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logLik.plm <- function(object){ | |
out <- -plm::nobs(object) * log(2 * var(object$residuals) * pi)/2 - deviance(object)/(2 * var(object$residuals)) | |
attr(out,"df") <- nobs(object) - object$df.residual | |
attr(out,"nobs") <- plm::nobs(object) | |
return(out) | |
} |
Spot on, thanks @Helix123!
I'll change it! It should, of course, give the same result!
This is great! Thanks for coming up with this!
thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't
plm::nobs(summary(object))
readplm::nobs(object)
?