Description Usage Arguments Details Value Author(s) Examples

Internal function, logsum (copied from coloc package)

1 | ```
logsum(x)
``` |

`x` |
numeric vector |

This function calculates the log of the sum of the exponentiated logs taking out the max, i.e. insuring that the sum is not Inf

ie, you want sum(x), but have x already stored in logs. log(sum(exp(x))) might fail, but logsum(x) should work.

max(x) + log(sum(exp(x - max(x))))

Claudia Giambartolomei

1 2 3 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.