-
Notifications
You must be signed in to change notification settings - Fork 53
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
Include sample size in escalc/rma.mv outputs #62
Comments
Could you please be more specific what exactly you would like to see in the output? |
Hi Wolfgang. Thanks for the quick response. So currently metafor::escalc outputs yi and vi, but not the treatment/control group sample sizes used to calculate the effect size. This would be handy to include when append=F, for plotting etc later. For rma.mv, it would be also nice if there was an option to conserve this information on underlying sample sizes in the model object, because when using metafor::funnel for example, it will throw up an error:
So it's more about conserving the information used to calculate effect sizes/build models throughout the pipeline. P.S. I must admit I'm not 100% sure what sample size/ni is best to use for plotting (e.g. funnel plots, scatter okit with sample size represted as point size) when you have an effect size calculated from a treatment and control group. Treatment, control, or some summary (e.g. mean) of the two (because sample size between treatment and control may differ). So if there's a common summary of the two that is used, that would be great to include too. Thanks |
Actually,
Functions like
Then functions like
|
Ah yes, of course, this rings a bell now, thanks! In binding them to dataframes in my pipeline I forgot because the 'ni' attribute was lost...would it be possible to output the 'ni' attribute as an extra column in the yi/vi dataframe, as a future feature request perhaps? Could keep it as an attribute of yi, but as an extra column it would be handy for custom plotting? |
Not sure what kind of binding operations you are doing, but there are methods for
Adding |
Yeah, I know it's quite a slight feature change request, but in my mind, it would be nice to have the yi/vi/ni outputted as one dataframe (ni can remain an attribute of 'yi' of course), to facilitate custom (outside metafor) downstream plotting/analyses. Although the control and treatment group sample sizes are in your original dataframe, and the 'ni' sample sizes are just sum of your control and treatment group sample sizes, I think it'd be helpful to have this added. Example:
So if escalc could do line 6 (add the ni column) for you, I think it just makes things a bit easier/cleaner for those wanting to use 'ni' outside of metafor functions. It could just be an option in escalc. |
I have given this some further thought, but won't be pursuing this further. I definitely wouldn't want to make this behavior the default, since there are by now hundreds of documents that would require updating showing the changed output. It's also a bit late now for changing the default output of |
Classification:
Feature Request
Summary
Option to include sample size in the outputs of escalc/rma.mv (cannot see an option to do this right now - if there is please could you direct me to it and close the issue?). Thanks!
The text was updated successfully, but these errors were encountered: