-
Notifications
You must be signed in to change notification settings - Fork 13
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
Hide panels #1
Comments
Thanks for your compliments! I designed the package to be pretty flexible, so you can do this without any changes to the code. The panels that get plotted are completely configurable. The default includes the variable name as the second member of the list and the factor levels as the third. So, an easy way of doing this would be:
If you look at the output of |
Please let me know if that resolves the question you had and I'll close the issue. |
Many thanks Dr Kennedy, problem solved. If You are planning future versions of this package, it would be great if there were columns for number of events, person years and event rates, whenever applicable (coxph). Thats just a proposition, however, I'm very satisfied with the package in current format. Cheers |
Great! For your other point, I'm not clear on how you'd want to include number of events, etc. since they apply to the whole model, not to each separate covariate. They're also not part of the standard output from |
Perhaps it was a bad idea, but I'll try to clarify. Suppose you examine the association between treatment groups and mortality. Using Your package it is easy to present a plot of the association, particularly with "covariates=c()" argument which filters out unwanted predictors. The plot displays number of individuals in each treatment group, along with hazard ratios and p values. But it does not present number of events in both groups, nor event rates (the former would be the most important from an epidemiological perspective). However, it is not a difficult task to code this separately and display it in a separate table but I'm thinking it could be valuable to see directly in the forest plot. I will have a go at trying to code it myself but it won't be of the same quality as your work. |
I understand now. I’ve created new variables for the number of events and the person-time (which would be person-years if the time is measured in years). It’s currently on its own branch at https://github.com/NikNakk/forestmodel/tree/newcoxphvars and issue #2. I’ve added an example which uses custom panels with these new variables. From: arazraw [mailto:notifications@github.com] Perhaps it was a bad idea, but I'll try to clarify. Suppose you examine the association between treatment groups and mortality. Using Your package it is easy to present a plot of the association, particularly with "covariates=c()" argument which filters out unwanted predictors. The plot displays number of individuals in each treatment group, along with hazard ratios and p values. But it does not present number of events in both groups, nor event rates (the former would be the most important from an epidemiological perspective). However, it is not a difficult task to code this separately and display it in a separate table but I'm thinking it could be valuable to see directly in the forest plot. I will have a go at trying to code it myself but it won't be of the same quality as your work. — |
Absolutely lovely package - saves huge amounts of time.
As you surely know it is common to perform regression with sequential adjusting (e.g models 1 to 3), and therefore it would be great if one could display several forest plots side by side, and that is doable in current format by (for example) using gridExtra to place the plots next to each other. However, it is desirable to be able to remove some panels from selected plots in order to not repeat variable names. Is it possible to remove that panel, i.e the variable name panel and thus only display "N", "Hazard Ratio", and "P"?
Best regards
The text was updated successfully, but these errors were encountered: