log_weighted_mean: Weighted mean on logarithmic scale

Description Usage Arguments Value Examples

View source: R/log_weighted_mean.R

Description

Weighted mean on logarithmic scale

Usage

1
log_weighted_mean(U, log.a, log.b)

Arguments

U

Vector of weights in [0,1].

log.a

Vector of logarithms of the first term.

log.b

Vector of logarithms of the second term.

Value

Logarithm of U*a+(1-U)*b.

Examples

1
2
3
4
log_weighted_mean(U=c(1,0.5,0),log.a=c(-10,12,42),log.b=c(60,2,-10))
log_weighted_mean(U=0.4,log.a=-2.88e-21,log.b=-1.38e-16)
log_weighted_mean(U=0.295,log.a=-5.748586e-23,log.b=-1.199389e-18)
log_weighted_mean(U=0.5751,log.a=-6.414215e-22,log.b=-2.806906e-17)

bomarkussen/probit documentation built on April 3, 2021, 7:38 p.m.