Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.
If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
> LL <- function(para,x,t,T)
+ {r <- para[1]
+ s <- para[2]
+ a <- para[3]
+ b <- para[4]
+
+ logL <- log(gamma(r+x))-log(gamma(r))+r*log(s)+log(gamma(a+b))+log(gamma(b+x))-log(gamma(para[4]))-log(gamma(a+b+x))
+ +log((s+q)^(-r-x)+(a/(b+x-1))*(s+t)^(-r-x))
+ return(logL)
+ }
> result <- maxLik(LL,grad = NULL,hess = NULL) Error in checkFuncArgs(fn, argNames, "fn", "maxNR") : argument 't' of the function specified in argument 'fn' of function 'maxNR' (partially) matches the argument names of function 'maxNR'. Please change the name of this argument
这是什么原因,是我的数据格式有问题吗