pzivich / zEpid

Epidemiology analysis package
http://zepid.readthedocs.org
MIT License
141 stars 33 forks source link

add p-value column in a forrest plot/ effectmeasureplot #160

Closed hellorp1990 closed 3 years ago

hellorp1990 commented 3 years ago

Hi,

Is it possible to add p values for every row in a forrest plot right after showing OR and 95% CI column?

pzivich commented 3 years ago

Hello, p-values cannot be added with the current forest plot implementation.

I don't plan to add functionality to display p-values in the forest plots. There are two reasons for my decision: (1) null hypothesis significance testing (NHST) lends itself to misinterpretations, (2) no extra information is provided when adding a p-value compared to the plot and confidence interval estimates, and (3) if a user is determined to do NHST they are still do so with the confidence intervals. The standard to avoid p-values is common across the functionalities within zEpid for this reason (e.g., no estimators return p-values).

If you are determined to add p-values to a forest plot, I would recommend adapting the class object here. The class is self-contained, so it should be easily to copy and edit accordingly. You would need to add (1) input for a vector of p-values, (2) add a label in the table, (3) have the table tval argument add the p-values as rows (along with the updated labels) here.

hellorp1990 commented 3 years ago

@pzivich Thank you for your response. I modified the code and it works fine. I am going to close this issue.