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: rvarad...@jhmi.edu


----- Original Message -----
From: Sally Luo <shali...@gmail.com>
Date: Thursday, September 30, 2010 11:15 pm
Subject: [R] Place constrictions on parameters when using Optim and MaxLik
To: r-help@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@r-project.org mailing list
>  
>  PLEASE do read the posting guide 
>  and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to