Hausdorff's condition – alternating finite differences all
non-negative – is necessary AND sufficient. min_difference is
returned because a sequence can be feasible by a tiny margin.
Details
Formula: m realisable on [0, 1] iff (-1)^k (Delta^k m)_j >= 0 for all j, k >= 0, where (Delta m)_j = m_{j+1} - m_j
References
Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, Section 3.4.4. That section gives NO formula; the realisability condition is Hausdorff (1921), Mathematische Zeitschrift 9, 74-109, and is cited to its own source. Ghosal read from the copy of the book held in the corpus.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Momprior(V)
#> $feasible
#> [1] 0
#>
#> $min_difference
#> [1] -1
#>
#> $n_violations
#> [1] 7
#>
#> $order
#> [1] 7
#>
#> $differences
#> $differences[[1]]
#> [1] 1 2 3 4 5 6 7 8
#>
#> $differences[[2]]
#> [1] -1 -1 -1 -1 -1 -1 -1
#>
#> $differences[[3]]
#> [1] 0 0 0 0 0 0
#>
#> $differences[[4]]
#> [1] 0 0 0 0 0
#>
#> $differences[[5]]
#> [1] 0 0 0 0
#>
#> $differences[[6]]
#> [1] 0 0 0
#>
#> $differences[[7]]
#> [1] 0 0
#>
#> $differences[[8]]
#> [1] 0
#>
#>
#> $method
#> [1] "Hausdorff moment feasibility, Ghosal Section 3.4.4"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
