Skip to contents

distortion_g() evaluates g at survival probabilities; distortion_weights() gives the weight of each of n equally likely values sorted ascending.

Usage

distortion_g(d, s)

distortion_weights(d, n)

Arguments

d

A distortion.

s

Survival probabilities in [0, 1].

n

Number of values.

Value

A numeric vector; the weights are non-negative and sum to 1.

Examples

distortion_weights(distortion("tvar", 0.5), 4)
#> [1] 0.0 0.0 0.5 0.5