[R] Error in optim

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Sat Oct 29 00:44:23 CEST 2011


Why don't you try substituting your vector of values and see what comes out...once you figure out what happened, the sum() command will solve your problems. 

Michael

On Oct 28, 2011, at 5:10 PM, djbanana <karl79264219 at gmail.com> wrote:

> I understand that the likelihood function is a product and hence the log
> likelihood function is a sum. However I can't figure out what the problem
> is.
> 
> Here's the likelihood function:
> 
> [(alpha1*beta2*gamma)^v1 exp^(-alpha1*beta2*gamma)]/v1! * [(alpha2*beta1)^v2
> exp^(-alpha2*beta1)]/v2!
> 
> Isn't the log-likelihood function as I calculated before?
> 
> Thanks,
> DJ
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Error-in-optim-tp3948980p3949218.html
> Sent from the R help mailing list archive at Nabble.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.



More information about the R-help mailing list