SpinBounds is an internal function used by
simPH's simulation commands to find the shortest
probability interval. It is largely drawn from Liu's
(2013) SPIn command (version 1.1), with two
modifications. First it returns just the lower or upper
bound of the interval, rather than the whole SPIn object.
Second, if there is no variation in the interval (as the
hazard ratio for a fitted value of 0, e.g. all simulation
values are 1) it takes the "central interval" of the
simulations. Effectively it reduces the number of
simulations by nsim * ci.SpinBounds(x, conf = 0.95, LowUp = NULL, bw = 0, lb = 0,
ub = Inf, l = NA, u = NA)1 (Low) or 2 (High).lb = 0 as this is the relevant lower bound for
quantities of interest from survivSpinBounds internal function for finding the lower
bound from SPIn. This function and documentation is
largely based directly on the original SPIn
command by Ying Liu.