Function for the determination of the population thresholds an uncertain and inconclusive interval for bi-normal distributed test scores.
nlopt.ui(
UI.Se = 0.55,
UI.Sp = 0.55,
mu0 = 0,
sd0 = 1,
mu1 = 1,
sd1 = 1,
intersection = NULL,
start = NULL,
print.level = 0
)
(default = .55). Desired sensitivity of the test scores within the uncertain interval. A value <= .5 is not allowed.
(default = .55). Desired specificity of the test scores within the uncertain interval. A value <= .5 is not allowed.
Population value or estimate of the mean of the test scores of the persons without the targeted condition (controls).
Population value or estimate of the standard deviation of the test scores of the persons without the targeted condition (controls).
Population value or estimate of the mean of the test scores of the persons with the targeted condition (patients).
Population value or estimate of the standard deviation of the test scores of the persons with the targeted condition (patients).
Default NULL. If not null, the supplied value is used as the estimate of the intersection of the two bi-normal distributions. Otherwise, it is calculated.
Default NULL. If not null, the first two values of the supplied
vector are used as the starting values for the nloptr
optimization
function.
Default is 0. The option print.level controls how much output is shown during the optimization process. Possible values: 0) (default) no output; 1) show iteration number and value of objective function; 2) 1 + show value of (in)equalities; 3) 2 + show value of controls.
List of values:
Integer value with the status of the optimization (0 is success).
More informative message with the status of the optimization
Vector with the following values:
Vector with the following values:
The function can be used to determinate the uncertain interval of two bi-normal distributions. The Uncertain Interval is defined as an interval below and above the intersection of the two distributions, with a sensitivity and specificity below a desired value (default .55).
Only a single intersection is assumed (or a second intersection where the overlap is negligible).
From version 0.7 onwards, mu0 can be larger than mu1. In earlier versions correct (but negative) results could be obtained only when -mu0 and -mu1 were used.
The function uses an optimization algorithm from the nlopt library (https://nlopt.readthedocs.io/en/latest/NLopt_Algorithms/): the sequential quadratic programming (SQP) algorithm for nonlinear constrained gradient-based optimization (supporting both inequality and equality constraints), based on the implementation by Dieter Kraft (1988; 1944).
Dieter Kraft, "A software package for sequential quadratic programming", Technical Report DFVLR-FB 88-28, Institut f<U+00FC>r Dynamik der Flugsysteme, Oberpfaffenhofen, July 1988.
Dieter Kraft, "Algorithm 733: TOMP<U+2013>Fortran modules for optimal control calculations," ACM Transactions on Mathematical Software, vol. 20, no. 3, pp. 262-281 (1994).
# NOT RUN {
# A simple test model:
nlopt.ui()
# Using another bi-normal distribution:
nlopt.ui(mu0=0, sd0=1, mu1=1.6, sd1=2)
nlopt.ui(mu0=0, sd0=1, mu1=1.6, sd1=2)
nlopt.ui(mu0=-1.6, sd0=2, mu1=0, sd1=1)
# The example below (with mu0 > mu1) works correctly from version 0.7 onward
nlopt.ui(mu0=1.6, sd0=2, mu1=0, sd1=1)
# }
Run the code above in your browser using DataLab