| distanceSSLogN | R Documentation |
Calculates the sum squared difference between log(N) in current and previous
state. This function can be used in projectUntilSettled() to decide when
sufficient convergence to steady state has been achieved.
Only the size classes that hold fish are measured. A class whose density is
zero in either state has no log to take, and one holding a negligible share
of its species' biomass has a log that never stops moving: above a size where
growth stops the density decays exponentially, so log(n) falls by the same
amount between every pair of states, for ever. Left in the sum, a single such
class holding 10^{-92} g of fish can hold the distance above any
tolerance indefinitely and stop projectUntilSettled() from ever converging,
while the biomass drift correctly reports a fixed point. Excluding it changes
nothing for a model that does not have one, because the classes that hold the
fish are exactly the classes that are kept.
distanceSSLogN(
params,
current,
previous,
biomass_share_cutoff = steady_share_cutoff(),
...
)
The sum of squares of the difference in the logs of the fish
abundances n, over the size classes that hold fish in both states:
sum((log(current$n) - log(previous$n))^2)
Other distance functions:
distanceMaxRelRDI()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.