Sally Luo
2010-Oct-01 02:08 UTC
[R] Place constrictions on parameters when using Optim and MaxLik
Hi R users, I am trying to restrct the range of two of the parameters in a maximization problem. Both parameters should be between -1 and 1. As far as I know, if I choose the estimation method ="L-BFGS-B" under Optim, I can restrict the parameter space. However, the "L-BFGS-B" always require finite values of the loglik function and cannot get around of the problem if an infinite value occurs. Does anyone know how to restrict parameters with other algorithms such as "BFGS" or "SANN" under the Optim function? Also can I restrict parameters to be within a certain range when using MaxLik? Thanks so much for your help. Maomao [[alternative HTML version deleted]]
Ravi Varadhan
2010-Oct-01 03:28 UTC
[R] Place constrictions on parameters when using Optim and MaxLik
There are several options to implement box constraints including "nlminb", "BB", "minqa", "Rcgmin", "Rvmmin". See the "optimx" package which integrates all of these. Ravi. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvaradhan at jhmi.edu ----- Original Message ----- From: Sally Luo <shali623 at gmail.com> Date: Thursday, September 30, 2010 11:15 pm Subject: [R] Place constrictions on parameters when using Optim and MaxLik To: r-help at r-project.org> Hi R users, > > I am trying to restrct the range of two of the parameters in a maximization > problem. Both parameters should be between -1 and 1. As far as I > know, if > I choose the estimation method ="L-BFGS-B" under Optim, I can > restrict the > parameter space. However, the "L-BFGS-B" always require finite > values of > the loglik function and cannot get around of the problem if an infinite > value occurs. Does anyone know how to restrict parameters with other > algorithms such as "BFGS" or "SANN" under the Optim function? Also > can I > restrict parameters to be within a certain range when using MaxLik? > > Thanks so much for your help. > > Maomao > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code.