View source: R/decay_logistic.R
decay_logistic | R Documentation |
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.
decay_logistic(cutoff, sd)
cutoff |
A |
sd |
A |
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).
A function
that takes a generic travel cost vector (numeric
) as
input and returns a vector of weights (numeric
).
Other decay functions:
decay_binary()
,
decay_exponential()
,
decay_linear()
,
decay_power()
,
decay_stepped()
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.