Learn R Programming

coloc (version 5.2.3)

logdiff: logdiff

Description

Internal function, logdiff

Usage

logdiff(x, y)

Value

max(x) + log(exp(x - max(x,y)) - exp(y-max(x,y)))

Arguments

x

numeric

y

numeric

Author

Chris Wallace

Details

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