# Circular-specific statistics
curve(p_Sobolev(x = x, p = 2, type = "Watson", method = "HBE"),
n = 2e2, ylab = "Distribution", main = "Watson")
curve(p_Sobolev(x = x, p = 2, type = "Rothman", method = "HBE"),
n = 2e2, ylab = "Distribution", main = "Rothman")
curve(p_Sobolev(x = x, p = 2, type = "Pycke_q", method = "HBE"), to = 10,
n = 2e2, ylab = "Distribution", main = "Pycke_q")
curve(p_Sobolev(x = x, p = 2, type = "Hermans_Rasson", method = "HBE"),
to = 10, n = 2e2, ylab = "Distribution", main = "Hermans_Rasson")
# Statistics for arbitrary dimensions
test_statistic <- function(type, to = 1, pmax = 5, M = 1e3, ...) {
col <- viridisLite::viridis(pmax - 1)
curve(p_Sobolev(x = x, p = 2, type = type, method = "MC", M = M,
...), to = to, n = 2e2, col = col[pmax - 1],
ylab = "Distribution", main = type, ylim = c(0, 1))
for (p in 3:pmax) {
curve(p_Sobolev(x = x, p = p, type = type, method = "MC", M = M,
...), add = TRUE, n = 2e2, col = col[pmax - p + 1])
}
legend("bottomright", legend = paste("p =", 2:pmax), col = rev(col),
lwd = 2)
}
# Ajne
test_statistic(type = "Ajne")
# \donttest{
# Gine_Gn
test_statistic(type = "Gine_Gn", to = 1.5)
# Gine_Fn
test_statistic(type = "Gine_Fn", to = 2)
# Bakshaev
test_statistic(type = "Bakshaev", to = 3)
# Riesz
test_statistic(type = "Riesz", Riesz_s = 0.5, to = 3)
# PCvM
test_statistic(type = "PCvM", to = 0.6)
# PAD
test_statistic(type = "PAD", to = 3)
# PRt
test_statistic(type = "PRt", Rothman_t = 0.5)
# Quantiles
p <- c(2, 3, 4, 11)
t(sapply(p, function(p) q_Sobolev(u = c(0.10, 0.05, 0.01), p = p,
type = "PCvM")))
t(sapply(p, function(p) q_Sobolev(u = c(0.10, 0.05, 0.01), p = p,
type = "PAD")))
t(sapply(p, function(p) q_Sobolev(u = c(0.10, 0.05, 0.01), p = p,
type = "PRt")))
# Series truncation for thre = 1e-5
sapply(p, function(p) length(weights_dfs_Sobolev(p = p, type = "PCvM")$dfs))
sapply(p, function(p) length(weights_dfs_Sobolev(p = p, type = "PRt")$dfs))
sapply(p, function(p) length(weights_dfs_Sobolev(p = p, type = "PAD")$dfs))
# }
Run the code above in your browser using DataLab