# uzupelnic fig_captions, zeby dalo sie je zrobic
library(kendallRandomWalks)
kendall_rws <- simulate_kendall_rw(10, 100, runif, 0.25)
kendall_rws
#> Simulations of Kendall random walk
#> Number of simulations: 10
#> Length of a single simulation: 100
#> Step distribution: runif
#> Alpha parameter: 0.25
plot(kendall_rws)
Symmetric
kendall_rws2 <- simulate_kendall_rw(1000, 100, runif, 0.25)
ladder_moments <- ladder_moment(kendall_rws2, 1000)
ladder_moments
#> Mean of the distribution: 14.917
#> Standard deviation of the distribution: 9.39374
#> Number of observations: 1000
#> Times the level was not crossed: 0
#> Quantiles of the distribution:
#> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
#> 3 5 7 9 11 13 15 17 21 27 70
plot(ladder_moments)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
ladder_heights <- ladder_height(kendall_rws2, 2000)
ladder_heights
#> Mean of the distribution: 2197744
#> Standard deviation of the distribution: 42066190
#> Number of observations: 1000
#> Times the level was not crossed: 0
#> Quantiles of the distribution:
#> 0% 10% 20% 30% 40% 50%
#> 2.018395e+03 2.521659e+03 3.200712e+03 4.128353e+03 5.517956e+03 8.734957e+03
#> 60% 70% 80% 90% 100%
#> 1.413979e+04 2.315729e+04 4.960864e+04 1.663590e+05 1.260329e+09
plot(ladder_heights)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Exact first ladder moments distribution with G(a) computed numerically.