[R] psigamma derivative
Hello, I am trying to find a hessian matrix that involves log(gamma(1/p)) second derivative, p being one of the parameters of the function. I am using a function deriv with the hessian=TRUE option, but psigamma is not on the list of derivative functions. I know that it is possible to use 'psigamma(p,deriv)', but it doesn't work with 1/p. Does anybody can help with this? Thanks, Ana Maria __ R-help@stat.math.ethz.ch 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.
[R] equality constraint
I would like to optimize a (log-)likelihood function subject to linear equality constraints in parameters. My function has eight parameters. The first one, third and fourth are greater than zero, the second one must be less than zero. The problem is that the last four must sum zero. Function constrOptim only fits inequality constraints. Is there an alternative to lead with this problem? Ana Maria __ R-help@stat.math.ethz.ch 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.