[R] Relative constraint using constrOptim?

Gabor Grothendieck ggrothendieck at gmail.com
Fri Oct 6 13:54:01 CEST 2006


Reparameterize replacing x1 with x2+delta constraining delta
to be positive or else replace x1 with x2 + delta^2 and
no constraint.

On 10/6/06, Felix Eggers <eggers at econ.uni-hamburg.de> wrote:
> I am trying to optimize a likelihood function using constrOptim. I
> know from prior research that, e.g. x1>x2. Is there a way to include
> that constraint into the optimization routine, i.e. the ci
> constraint? The examples I found only use absolute numeric values for
> the constraint and not relative values. My attempts to include it
> into ci failed: e.g. ci=c(1, x[1]).
>
>  Am I using the right function or is there another one that could
> solve my problem?
>
> Any help would be much appreciated!
>
> Best regards
> Felix
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list