I am trying to obtain the grafic of a pdf . but this error keeps showing .
Here is the code
Or use the complex gamma function gammaz() in package 'pracma'.
The following code works, that is produces a plot:
library(pracma)
MXN.fd - function(x,alpha,beta,mu,delta) {
A -
I am trying to obtain the grafic of a pdf . but this error keeps showing .
Here is the code
MXN.fd = function(x,alpha,beta,mu,delta)
{
A = (2*cos(beta/2))^(2*delta)
B = 2*alpha*pi*gamma(2*delta)
C = (beta*(x-mu))/alpha
D = abs(gamma(delta + (complex(0,0,1)*(x-mu))/alpha)^2)
M = A/B*exp(C)*D
M
Guaramy Guaramy at hotmail.com writes:
[SNIP]
i think the problem is the gamma function, does anyone know how to compute
gamma with imaginary numbers?
Try lngamma_complex() in the gsl package?
Ben Bolker
__
R-help@r-project.org mailing
3 matches
Mail list logo