daniel1noble / orchaRd

Extending the Orchard Plot for Meta-analysis
https://daniel1noble.github.io/orchaRd/
11 stars 6 forks source link

N is not working in orchard_plot #38

Closed scubetto closed 11 months ago

scubetto commented 11 months ago

Hi, I am trying to make an orchard plot by representing sampling size instead of the default 1/SE, but it is not working and R gives me an error like: Error in [.data.frame(data, , N) : selezionate colonne non definite. I tried to run even the example given in the help pages but I obtain the same error. Any idea?

daniel1noble commented 11 months ago

Hi. I'm not totally sure what is happening in your case in relation to the error. You will need to provide some more detail and code.

Running the example in the vignette (lim) works as expected. The legend is weighted by same size not 1/SE, and switching between them weights by 1/SE.

I think maybe there is a little confusion about what the N argument is doing, and this was because we did not word this clearly enough in the help file! Thanks for bringing that to our attention. I have now updated the documentation to make this clearer!

To be clear about what the N argument will do. It will scale the point estimate for each effect size by sample size instead of 1/SE, not plot the summed sample size in each moderator level to replace of k and g in the plot, which I think is what you're trying to do? We currently do not have that functionality for plotting N per moderator in the package. I could maybe add this as something we do down the road, but it will take a bit of time for me to add that.

You could easily do this your self if you wish. You can suppress k and g and then add annotation to the plots with the summed sample size for each moderator.