On Fri, Feb 24, 2012 at 12:18 PM, nserdar <snes1...@hotmail.com> wrote:
> Hi
>
> I need a "phi" restriction in my code. That is   "0<phi<1 "
>
> How can I do that ?

> init.par<-c(1,1,1,1)
> estimate<- optim(init.par,Linn,gr=NULL,method= "BFGS", hessian=FALSE,control
> = list(trace=1))
>

You want method "L-BFGS-B" not "BFGS". See details in ?optim

Best


> Regards,
> res
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Optim-package-restriction-tp4418379p4418379.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.

______________________________________________
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