Uses fast Fortran code to compute the pseudomedian of a numeric vector. The pseudomedian is the median of all possible midpoints of two observations. The pseudomedian is also called the Hodges-Lehmann one-sample estimator. The Fortran code is was originally from JF Monahan, and was converted to C++ in the DescTools
package. It has been converted to Fortran 2018 here. Bootstrap confidence intervals are optionally computed.
If n > 250,000 a random sample of 250,000 values of x
is used to limit execution time. For n > 1,000 only the percentile bootstrap confidence interval is computed.
Bootstrapping uses the Fortran subroutine directly, for efficiency.