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: Add runrecord-like functionality #161

Open
billdenney opened this issue Jun 20, 2019 · 5 comments
Open

Feature Request: Add runrecord-like functionality #161

billdenney opened this issue Jun 20, 2019 · 5 comments

Comments

@billdenney
Copy link
Contributor

When reporting, I use xpose as my default reporting package. With that, I would like to simplify the way that I generate records of my runs.

Specifically, I would like to generate a table (aka data.frame) with indicators for the model characteristics (like OFV), description, and nesting. With some relatively straight-forward heuristics, all of this could be automated including the nesting. That said, xpose currently focuses on results at the single-model level not at the level of a group of models.

That also, said, compatibility with broom (as requested in #158), could take us 95% of the way there. Running glance() on a list of models then rbind()ing the results is a table of model summaries.

@mattfidler
Copy link

There are also packages that will produce report ready tables baesd on broom

@billdenney
Copy link
Contributor Author

@mattfidler, what are some of those packages? And, will they do things like model nesting calculations? (I'm wanting change in AIC or OFV.)

@mattfidler
Copy link

Unfortunately nesting calculations are not implemented yet.

The report-based tables are currently in

However, they are more geared to stats reports, and don't exactly list what I find useful for a pharmacometrics report. The nlmixr output that I have more closely resembles what I find useful, but it isn't generated from broom entirely.

For me one catch of broom is the back transformation of the parameters on a log vs non-log space.

@billdenney
Copy link
Contributor Author

billdenney commented Aug 5, 2019

Thanks for the pointers. I'd looked at huxtable before, but I'd not seen texreg.

I wrote some nesting code yesterday that's not quite ready for prime time. (It works, but I've not checked it for robustness to other situations than what I was working on yesterday.) What I wrote can take a list of xpose objects when they have the parentage defined and automatically nest them with indentation, and it will automatically generate a description of changes from the parent model indicating what parameters were added for estimation or as fixed, removed from estimation or as fixed, fixed, unfixed, or had a changed fixed value.

I'd like for it to automatically determine parentage even when it's not provided, but that is somewhere between hard and impossible. My thoughts there are that a distance matrix could be generated indicating how far the models are from each other on parameters that are included, and then given an initial model do serial connection to the closest model(s) making a directed acyclic graph. The distance for "how far" could be determined by some metric of the parameters added/removed/fixed/unfixed. But, all of this paragraph assumes that parameter descriptions define the model, and subtleties will always creep in.

@mattfidler
Copy link

I this seems pretty nice.

I also think it would be nice to use broom models to create a so called anova analysis. The first would be the parent and then you could nest them. It could lead to generic sorts for automatic covariate searching.

The distance matrix seems a nice idea, but as you said the subtleties make it error prone.

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

3 participants