Re: [R] Maximization under constraits

From: Ritwik Sinha <ritwik.sinha_at_gmail.com>
Date: Sun, 27 Jul 2008 18:53:40 -0400

Hi Daniela,

Will the "optim" function with the method "L-BFGS-B" work for you? Look for the "lower" argument in the function.

Ritwik

On Fri, Jul 25, 2008 at 9:07 AM, Daniela Garavaglia <danygaravaglia84_at_virgilio.it> wrote:
>
> I'm looking for a R function which can maximise this logliklihood function,
> under the constraits a>0 e b>0
>
>
>
> f<-function(param){
>
> a<-param[1]
>
> b <-param[2]
>
> log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(pi
> ))*(1-pnorm(-b/(2*sqrt(a)), mean=0, sd=1)))))}
>
>
>
> I've tried maxlik constrOptim e donlp2 but without success.
>
>
>
> Thanks so much!!!
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.

--
Ritwik Sinha
ritwik.sinha@gmail.com | +12033042111 | http://ritwik.sinha.googlepages.com/

______________________________________________
R-help_at_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.
Received on Sun 27 Jul 2008 - 22:56:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 27 Jul 2008 - 23:34:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive