adayim / forestploter

Draw forestplot in R
Other
78 stars 10 forks source link

Grouped forestplot - order groups and assign diamonds to overall estimate #28

Open gpessoaamorim opened 1 year ago

gpessoaamorim commented 1 year ago

Hi there,

I'm using forestploter to depict mortality estimates across time periods for three different groups. Is it possible to manually set the order in which the groups are plotted, and to have diamond shapes in the overall estimates? From reading the vignette it doesn't seem like it but I thought I'd ask. Thanks

adayim commented 1 year ago

Hi, the order is based on the value you have provided. For example, if you have two columns to plot your CI, first two estimates will be considered as group 1, the next two estimates as group 2, etc. I hope this should solve your question.

I restricted the package not to draw diamond shape multiple groups. The diamond shape normally used for meta analysis, I don't think it's necessary to use this for the regression model if this is what you are using. You can put the overall at the top of the plot would help?

gpessoaamorim commented 1 year ago

Thanks for looking into this. I've installed v 0.2.2 and it seems to be working ok now

My aim was to plot mortality rates in three different populations over time, and then the overall mortality rate across the entire period at the bottom with a different shape as it is a summary estimate. I've highlighted that line using bold text (see code in separate issue request) but it'd be great if we could also use diamonds for this purpose (but I realise you're quite busy and it's not a true issue!). Thanks