[R-meta] forest plot function overall effect size rounded

Michael Dewey ||@t@ @end|ng |rom dewey@myzen@co@uk
Wed Oct 11 17:46:02 CEST 2023


Do you mean something like

sprintf("%1.2f", ((trunc(100 * 0.7080) / 100)))

perhaps?

Michael

On 11/10/2023 16:31, Gabriel Cotlier wrote:
> Dear Michael,
> 
> Thank you very much for clarifying it. You are indeed right; one thing 
> is rounding and the other is simply retrieving a given number of digits 
> or number precision, at least as far as I understand it.
> I just would like to appear in the forest plot exactly the same value 
> that gives the model results or output for the overall effect size, but 
> if the model's output is, for instance, 0.7080 and such a number is too 
> large, well then only the first 2 digits after the point would be 0.70.
> 
> Thanks a lot for your help.
> Kind regards,
> Gabriel
> 
> On Wed, Oct 11, 2023 at 5:46 PM Michael Dewey <lists using dewey.myzen.co.uk 
> <mailto:lists using dewey.myzen.co.uk>> wrote:
> 
>     Dear Gabriel
> 
>     Comments in-line
> 
>     On 11/10/2023 15:10, Gabriel Cotlier via R-sig-meta-analysis wrote:
>      > Hello all,
>      > I would like to ask how to modify in the forest plot the value of the
>      > overall effect size to be round (overall_effect_size, 1) since it
>      > aurtomatically does round(overall_effect_size, 2) for instance in
>     my case
>      > the model's output overall effect size is :
>      >
>      > p0 <- predict(res)
>      > p0
>      > # pred     se ci.lb <http://ci.lb>  ci.ub pi.lb <http://pi.lb>  pi.ub
>      > # 0.7080 0.2950 0.1297 1.2863 -2.9950 4.4110
>      >
>      > That is 0.7080 but in the forest lot is round(0.7080, 2) that is
>     0.71 as it
>      > appears in the forest plot (lower right corner):
>      >
>      >    100% 0.71 [0.13, 1.29]
>      >
>      > Therefore I would like to access the variable in the forest plot
>     and set it
>      > to be round(0.7080, 1) so as to have the overall effect size as
>     is in the
>      > model output, that is 0.70 or alternatively 0.7080.
> 
>     But round(0.7080, 1) is 0.7, not 0.70. Rounded to 2 decimals it is 0.71
>     which you state you do not want. Perhaps it would help if you explained
>     what you mean by rounding as what you ask does not seem to
>     correspond to
>     what is usually meant by the term.
> 
>     Michael
> 
>      >
>      > Thanks a lot.
>      > Kid regards,
>      > Gabriel
>      >
>      >       [[alternative HTML version deleted]]
>      >
>      > _______________________________________________
>      > R-sig-meta-analysis mailing list @
>     R-sig-meta-analysis using r-project.org
>     <mailto:R-sig-meta-analysis using r-project.org>
>      > To manage your subscription to this mailing list, go to:
>      > https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>     <https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis>
>      >
> 
>     -- 
>     Michael
> 
> 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>	Virus-free.www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
Michael



More information about the R-sig-meta-analysis mailing list