adriennekline/psmpy

cohenD dataframe

Opened this issue · 4 comments

Hi Adrienne. Thanks for the great script.
After finding two groups one for old therapy and one for new therapy I need to calculate the effect size using cohenD function. The question that I have in my mind is that shouldn't I use these groups instead of passing original df to the cohenD function?
I saw in the tutorial that you passed "df" and I am confused why you didn't use the new matching groups to calculate cohenD score. I would really appreciate it if you could help me with this. Thanks a lot.

Hey Vito! So if you use the readme as described here: https://pypi.org/project/psmpy/ the 'df' referred to is a separate 'df' from the steps provided in the script and is meant as an 'add' on function since there weren't many instances of CohenD in other libraries. If you wanted the CohenD effect sizes from the steps outlined through a process data set please use: psm.effect_size to acertain the values before and after :)

Hi Adrienne, thanks a lot for the help. So to calculate effect size of the new balanced dataset (matched patients) I need to pass the new dataset to the CohenD function. Thanks you that was really helpful.

so you can also decare type: psm.effect_size to get the list of effect sizes before and after. the CohenD function is if you needed to calculate effect sizes for something else or another data set etc. But if you ran the function call on your data before and then on the df after matching you would get the same results as this is the function that is pulled in to run that portion of the analysis and generate effect size plots.

Thanks a lot Adrienne. Since I wanted to calculate the effect size of the treatment I thought I could combine the data "before" and "after" matching and run the CohenD on the combined data to see how much the treatment was effective (overall effect size) instead of calculating per feature effect size with psm.effect_size. But I guess that is not the right way to do it.