decay_logistic: Logistic decay function

View source: R/decay_logistic.R

decay_logisticR Documentation

Logistic decay function

Description

Returns a logistic weighting function (in which the weights follow the distribution of a reversed cumulative logistic curve) to be used inside accessibility calculating functions. The logistic curve is parameterized with the cutoff that sets its inflection point and the standard deviation that sets its steepness.

This function is generic over any kind of numeric travel cost, such as distance, time and money.

Usage

decay_logistic(cutoff, sd)

Arguments

cutoff

A numeric vector. The cost value that serves as the inflection point of the cumulative logistic curve.

sd

A numeric vector with same length as cutoff. The standard deviation of the logistic curve. Values near 0 result in weighting curves that approximate binary decay, while higher values tend to linearize the decay.

Details

When using a function created with decay_logistic(), the output is named after the combination of cutoffs ("c") and standard deviations ("sd") - e.g. given the cutoffs c(30, 40) and the standard deviations c(10, 20), the first element of the output will be named "c30;sd10" and the second will be named "c40;sd20". This function uses the adjusted logistic decay curve proposed by \insertCitebauer2016measuring;textualaccessibility, in which the condition f(0) = 1 is met (i.e. the weight of an opportunity whose cost to reach is 0 is 1).

Value

A function that takes a generic travel cost vector (numeric) as input and returns a vector of weights (numeric).

References

\insertAllCited

See Also

Other decay functions: decay_binary(), decay_exponential(), decay_linear(), decay_power(), decay_stepped()

Examples


weighting_function <- decay_logistic(cutoff = 30, sd = 5)

weighting_function(c(0, 30, 45, 60))

weighting_function <- decay_logistic(cutoff = c(30, 45), sd = c(5, 10))

weighting_function(c(0, 30, 45, 60))


accessibility documentation built on May 29, 2024, 7:29 a.m.