KWDual: Dual optimization for Kiefer-Wolfowitz problems

View source: R/KWDual.R

KWDualR Documentation

Dual optimization for Kiefer-Wolfowitz problems

Description

Interface function for calls to optimizer from various REBayes functions There is currently only one option for the optimization that based on Mosek. It relies on the Rmosek interface to R see installation instructions in the Readme file in the inst directory of this package. This version of the function is intended to work with versions of Mosek after 7.0. A more experimental option employing the pogs package available from https://github.com/foges/pogs and employing an ADMM (Alternating Direction Method of Multipliers) approach has been deprecated, those interested could try installing version 1.4 of REBayes, and following the instructions provided there.

Usage

KWDual(A, d, w, ...)

Arguments

A

Linear constraint matrix

d

constraint vector

w

weights for x should sum to one.

...

other parameters passed to control optimization: These may include rtol the relative tolerance for dual gap convergence criterion, verb to control verbosity desired from mosek, verb = 0 is quiet, verb = 5 produces a fairly detailed iteration log, control is a control list consisting of sublists iparam, dparam, and sparam, containing elements of various mosek control parameters. See the Rmosek and Mosek manuals for further details. A prime example is rtol which should eventually be deprecated and folded into control, but will persist for a while for compatibility reasons. The default for rtol is 1e-6, but in some cases it is desirable to tighten this, say to 1e-10. Another example that motivated the introduction of control would be control = list(iparam = list(num_threads = 1)), which forces Mosek to use a single threaded process. The default allows Mosek to uses multiple threads (cores) if available, which is generally desirable, but may have unintended (undesirable) consequences when running simulations on clusters.

Value

Returns a list with components:

f

dual solution vector, the mixing density

g

primal solution vector, the mixture density evaluated at the data points

logLik

log likelihood

status

return status from Mosek

. Mosek termination messages are treated as warnings from an R perspective since solutions producing, for example, MSK_RES_TRM_STALL: The optimizer is terminated due to slow progress, may still provide a satisfactory solution, especially when the return status variable is "optimal".

Author(s)

R. Koenker

References

Koenker, R and I. Mizera, (2013) “Convex Optimization, Shape Constraints, Compound Decisions, and Empirical Bayes Rules,” JASA, 109, 674–685.

Mosek Aps (2015) Users Guide to the R-to-Mosek Optimization Interface, https://docs.mosek.com/8.1/rmosek/index.html.

Koenker, R. and J. Gu, (2017) REBayes: An R Package for Empirical Bayes Mixture Methods, Journal of Statistical Software, 82, 1–26.


REBayes documentation built on Aug. 19, 2023, 5:10 p.m.