dLSW | R Documentation |
Density and distribution function for the Lifshitz-Slyozov-Wagner (LSW) distribution with mean mu.
dLSW(x, mu, log = FALSE)
pLSW(x, mu, lower.tail = TRUE, log.p = FALSE)
LSW_fit(x)
x |
vector of quantiles |
mu |
the mean of the distribution |
log , log.p |
logical; if |
lower.tail |
logical; if TRUE (default), probabilities are
|
The LSW distribution is a continuous distribution with density
f(x) = \frac{4x^2}{9\mu^3} ( \frac{3\mu}{3\mu + x} )^{7/3}
( \frac{3\mu}{3\mu - 2x} )^{11/3} e^{\frac{2x}{2x - 3\mu}}
where \mu
is the mean of the distribution.
The functions dLSW
gives the probability density, pLSW
gives the
distribution function. qLSW
and rLSW
are not implemented. You
can use LSW_fit
to fit an LSW distribution to a set of observations.
The length of the results is determined by the length of x
, and mu
can
only be a single value.
Please note that this distribution has support only on the interval [0,mu*3/2)
.
Probabilities outside this interval are returned as 0.
dLSW gives the density, pLSW gives the distribution function, both as numerical
vectors determined by the length of x
.
Siteur, Koen, Quan-Xing Liu, Vivi Rottschäfer, Tjisse van der Heide, Max Rietkerk, Arjen Doelman, Christoffer Boström, and Johan van de Koppel. 2023. "Phase-Separation Physics Underlies New Theory for the Resilience of Patchy Ecosystems." Proceedings of the National Academy of Sciences 120 (2): e2202683120. https://doi.org/10.1073/pnas.2202683120.
lsw_sews
# Plot the density
x <- seq(0, 10, l = 128)
plot(x, dLSW(x, mu = 3), type = "l", col = "black")
lines(x, dLSW(x, mu = 5), type = "l", col = "red")
lines(x, dLSW(x, mu = 7), type = "l", col = "blue")
legend(x = 0, y = max(dLSW(x, mu = 3)), lty = 1, col = c("black", "red", "blue"),
legend = paste("mu =", c(3, 5, 7)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.