Last active
June 19, 2024 08:27
-
-
Save moritzpschwarz/35fc5be900b99a1a593ab5dd7018ff7b to your computer and use it in GitHub Desktop.
logLik.plm function
This file contains 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) | |
} |
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
Spot on, thanks @Helix123!
I'll change it! It should, of course, give the same result!