Skip to content

Link-function rules with LogExpFunctions ​

Loading LogExpFunctions gives logistic, log1pexp and logit closed-form derivatives. A Derived parameter or a Transform whose map is one of them then takes its closed-form derivative rather than dual numbers. The derivative of logistic at value is  . Here a delay's hazard is the logistic of a parameter:

julia
using ComposableRecurrences, LogExpFunctions
CR = ComposableRecurrences
h = CR.Derived(logistic, [-1.5, -0.5])
cdf = TimeVarying(1 - CR.Survival(h), CR.Primary())
round.(CR.kernel_weights(cdf, 1); digits = 3)

# output

2×1 Matrix{Float64}:
 0.182
 0.491