Homework?? We don't do homework here. If not, ?optim or look at the CRAN "Optimize" task view for optimizers. There is even a maxLik package that might be useful.
-- Bert On Mon, Jul 2, 2012 at 8:58 PM, Ali Tamaddoni <alicivilizati...@gmail.com>wrote: > Hi All > > > > I have a data frame called "nbd" with two columns (x and T). Based on this > dataset I want to find the parameters of a distribution with the following > log-liklihood function and with r and alpha as its parameters: > > log(gamma(nbd$x+r))-log(gamma(r))+r*log(alpha)-(r+nbd$x)*log(nbd$T+alpha) > > the initial value for both parameters is 1. > > > > I would be thankful if you could help me to solve this problem in R. > > > > Regards, > > > > Ali > > > [[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. > -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm [[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.