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 <[EMAIL PROTECTED]> 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@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 [EMAIL PROTECTED] | +12033042111 | http://ritwik.sinha.googlepages.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.