Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: logLik method #188

Open
billdenney opened this issue Dec 30, 2020 · 1 comment
Open

Feature Request: logLik method #188

billdenney opened this issue Dec 30, 2020 · 1 comment
Milestone

Comments

@billdenney
Copy link
Contributor

I was wanting to compare two models using AIC, so I needed a logLik function. Here it is in case you think it would help:

logLik.xpose_data <- function(object, ...) {
  structure(
    -0.5*as.numeric(rev(object$summary$value[object$summary$label == "ofv"])[1]),
    df=sum(!get_prm(object)$fixed),
    class="logLik"
  )
}
@bguiastr
Copy link
Collaborator

Hi @billdenney, happy new year! Thanks a lot for the snippet, I have a lot on my plate at the moment but I would definitively consider to include this function into future versions of xpose.
Best

@bguiastr bguiastr added this to the xpose 0.5 milestone Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants