search for: digamma

Displaying 20 results from an estimated 30 matches for "digamma".

Did you mean: dgamma
2010 Mar 11
4
help about solving two equations
I have two matrix s1 and s2, each of them is 1000*1. and I have two equations: digamma(p)-digamma(p+q)=s1, digamma(q)-digamma(p+q)=s2, and I want to sovle these two equations to get the value of x and y, which are also two 1000*1 matrices. I write a program like this: f <- function(x) { p<- x[1]; q <- x[2]; ((digamma(p)-digamma(p+q)-s1[2,]) )^2 +((digamma(q)-digamma(p+q)...
2004 Feb 29
1
digamma with negative arguments (PR#6626)
Full_Name: Chanseok Park Version: 1.8.1 OS: linux-gnu Submission from: (NULL) (130.127.112.183) digamma with any negative value does not give a right answer. It gives -1.797693e+308 for any negative arguments. For example, digamma(-1.1) gives -1.797693e+308. The right answer should be 10.15416 This bug can be easily fixed by using the following digamma identity. digamma(x) = digamma(1-x) - pi/ta...
2010 Jul 20
0
Error in using matest function
...ng argument of type 'double' to logical 2: In FUN(newX[, i], ...) : coercing argument of type 'double' to logical 3: In FUN(newX[, i], ...) : coercing argument of type 'double' to logical 4: In FUN(newX[, i], ...) : coercing argument of type 'double' to logical 5: In digamma(df/2) : NaNs produced 6: In digamma(df/2) : NaNs produced 7: In digamma(df/2) : NaNs produced 8: In digamma(df/2) : NaNs produced Shabnam K. [[alternative HTML version deleted]]
2005 Jun 23
2
solving equation system
Hello, I want to solve some two dimensional equation system with R. Some systems are not solvable analytically. Here is an example: (I) 1/n*sum{from_i=1_to_n}(Xi) = ln lambda + digamma(c) (II) mean(X) = x / lambda I want to find lambda and c, which R-function could do that task? Carsten [[alternative HTML version deleted]]
2010 Jan 04
1
polygamma or Hurwitz zeta function
Hi, Is there any R library that is capable of handling polygamma function (Hurwitz zeta function also works)? I am aware of digamma(0 and trigamma(), but could not find more advanced versions. I'd appreciate any help. Hakan Demirtas
2007 Oct 14
1
Extending deriv3()
Hello, I was wondering if the functions deriv3(), deriv() etc. could be extended to handle psigamma() and its special cases (digamma(), trigamma() etc.). From the error message it seems that 'psigamma' needs to be added to the derivatives table. This might be easy since psigamma() has a deriv argument. Additionally, this error message is also obtained when requesting for the Hessian of the gamma and lgamma functions: d...
2009 Jun 03
2
problem with uniroot
...non linear equation, to find the degrees of freedom of a mixture of t student. I'm sure i wrote the minimization equation in the right way, but when i try to run the EM algorithm to estimate the parameters of the mixture, the following error will appear: Error in uniroot(function(z) log(z/2) - digamma(z/2) + 1 - log((z + d)/2) + : f() values at end points not of opposite sign I don't know how solve this problem, i have already tried using the function optimize, but it doesn't work. Someone could help me? thanks a lot -- Dr. Daniele Riggi, PhD student University of Milano-Bicocca D...
2009 May 16
1
maxLik pakage
...omega<-a[5] II<-log(prod((2*dt((x-ksi)/omega,nu)*pnorm((lambda1*(x-ksi)/omega)/sqrt(1+lambda2*((x-ksi)/omega)^2)))/omega)) II } ########definition of gradient  function gradlik<- function(a){ nu<-a[1] lambda1<-a[2] lambda2<-a[3] ksi<-a[4] omega<-a[5]  #*******# h<-c(f1=n*digamma((nu+1)/2)-n/(2*nu)-n*digamma(nu/2)-1/2*sum(log(1+(x-ksi)^2/(omega^2nu)))+(nu+1)/2*sum((x-ksi)^2/(omege^2*nu^2+nu*(x-ksi)^2)), f2=sum((x-ksi)*dnorm(lambda1*(x-ksi)/sqrt(omega^2+lambda2*(x-ksi)^2))/(sqrt(omega^2+lambda2*(x-ksi)^2)*pnorm(lambda1*(x-ksi)/sqrt(omega^2+lambda2*(x-ksi))))), f3=sum((lambd...
2008 Jan 27
2
Likelihood optimization numerically
...Gamma(alpha, beta), both unknown llk = -n*log(gamma(alpha)) - n*alpha*log(beta) + (alpha - 1)*(sum(log(x))) - (sum(x))/beta # analytic 1st derivative solution w.r.t alpha, assuming beta known # by putting MLE of beta = sum(x)/(n*alpha) # (to simplify as far as possible analytically) llk.1st = - n*digamma(alpha) -n*(log(sum(x)/(n*alpha))+1) + (sum(log(x))) It feels like i should use nls(... , trace=T, start=c(alpha=...),nls.control(maxiter=100,tol=.1)) but not sure "how". Can anyone provide me hint? Thank you for your time. Ehsan http://www.youtube.com/profile_play_list?user=wildsc0p...
2007 Jul 21
1
Gamma MLE
Hello, I was asked to try the following code on R, gamma.mles function (xx,shape0,rate0) { n<- length(xx) xbar<- mean(xx) logxbar<- mean(log(xx)) theta<-c(shape0,rate0) repeat { theta0<- theta shape<- theta0[1] rate<- theta0[2] S<- n*matrix(c(log(rate)-digamma(shape)+logxbar,shape/rate-xbar),ncol=1) I<- n*matrix(c(trigamma(shape),-1/rate,-1/rate,shape/rate^2),ncol=2) theta<- theta0 + solve(I) %*% S if(max(abs(theta-theta0)) < 1e-08) break } list(estimates=theta, infmat=I) } However, this appears: Error: object "gamma.mles" not found...
2010 May 05
1
testInstalledBasic question
..."asinh" [36] "atan" "atanh" "c" "ceiling" "cos" "cosh" "cummax" [43] "cummin" "cumprod" "cumsum" "digamma" "dim" "dim<-" "dimnames" [50] "dimnames<-" "exp" "expm1" "floor" "gamma" "is.array" "is.finite" [57] "is.infinite&quot...
2007 Oct 13
2
the use of the .C function
...1.0/(xa*xa); ps = log(xa)-0.5/xa+x2*(((((((a[7]*x2+a[6])*x2+a[5])*x2+ a[4])*x2+a[3])*x2+a[2])*x2+a[1])*x2+a[0]); ps -= s; } if (x < 0.0) ps = ps - M_PI*cos(M_PI*x)/sin(M_PI*x)-1.0/x; return ps; } However, when applicated the codes >digamma(-0.9) [1] -9.312644 OK! But when > dyn.load("psi.so") > out<-.C("psi", as.double(-0.9)) Erro en .C("psi", as.double(-0.9)) : C symbol name "psi" not in load table > out Error: objeto "out" no encontrado More information on OS: > v...
2006 Oct 30
1
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?
2011 Jun 29
0
Error in testInstalledBasic
...S3 generic 'ceiling' testing S3 generic 'Conj' testing S3 generic 'cos' testing S3 generic 'cosh' testing S3 generic 'cummax' testing S3 generic 'cummin' testing S3 generic 'cumprod' testing S3 generic 'cumsum' testing S3 generic 'digamma' testing S3 generic 'dim' testing S3 generic 'dim<-' testing S3 generic 'dimnames' testing S3 generic 'dimnames<-' testing S3 generic 'exp' testing S3 generic 'expm1' testing S3 generic 'floor' testing S3 generic 'gamma' test...
1997 Dec 13
1
R-beta: Compile error; R-0.60.1, Solaris 2.6, gcc 2.7.2.1
...mach.o gcc -g -I../include -c beta.c -o beta.o gcc -g -I../include -c gamma.c -o gamma.o gcc -g -I../include -c lbeta.c -o lbeta.o gcc -g -I../include -c lgamma.c -o lgamma.o gcc -g -I../include -c choose.c -o choose.o gcc -g -I../include -c dpsifn.c -o dpsifn.o gcc -g -I../include -c digamma.c -o digamma.o gcc -g -I../include -c sexp.c -o sexp.o gcc -g -I../include -c snorm.c -o snorm.o gcc -g -I../include -c sunif.c -o sunif.o gcc -g -I../include -c dbeta.c -o dbeta.o gcc -g -I../include -c pbeta.c -o pbeta.o gcc -g -I../include -c qbeta.c -o qbeta.o gcc -g -I../include...
2008 Mar 28
0
Belkin F6C1100-UNV not recognized by megatec_usb?
Hi everyone, I have a belkin ups that was bought around 2 months ago. It seems like the driver doesn't like the UPS, although on the website it's listed as supported. This is on a gentoo system with nut 2.2.1 . megatec_usb output: ---------SNIP---------- digamma nut # ./megatec_usb -a belkinm -DDDDDD Network UPS Tools 2.2.1 - Megatec protocol driver 1.5.9 [megatec_usb] Carlos Rodrigues (c) 2003-2007 Serial-over-USB transport layer for Megatec protocol driver [megatec_usb] Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c) 2007 debug...
2010 Apr 15
2
using nls for gamma distribution (a,b,d)
Dear all i want to estimated the parameter of the gamma density(a,b,d) f(x) = (1/gamma(b)*(a^b)) * ((x-d)^(b-1)) * exp{-(x-d)/a)} for x>d f(x) = Age specific fertility rate x = age when i run this in R by usling nls() gamma.asfr <- formula(asfr ~ (((age-d)^(b-1))/((gamma(b))*(a^b)))* exp(-((age-d)/a))) gamma.asfr1 <- nls(gamma.asfr, data= asfr.aus, start = list(b = 28, a = 1, d= 0.5),
2004 Jul 04
1
Rmetrics 191.10057
...2004-06-29 fOptions/demo A new example file named "funSpecFunsEBM.R" has been added with special mathematical functions which are used in the theory of exponential Brownian Motion. The functions included are: In Part I, the Error Function "erf", the Psi or Digamma Function "Psi", the Incomplete Gamma Function "igamma", the Gamma Function fpr complex arguments, and the Pochhammer Symbol "Pochhammer". In Part II, the Confluent Hypergeometric Functions of the 1st Kind and 2nd Kind "kummerM" and "kumme...
2007 Oct 03
1
R-2.6.0 is released
...e and internally generic for efficiency. They no longer dispatch on S3 methods for as.vector() (which was never documented). as.real() and as.numeric() remain as alternative names for as.double(). expm1(), log(), log1p(), log2(), log10(), gamma(), lgamma(), digamma() and trigamma() are now primitive. (Note that logb() is not.) The Math2 and Summary groups (round, signif, all, any, max, min, summ, prod, range) are now primitive. See under METHODS PACKAGE below for some consquences for S4 methods. o apropos() now sorts...
2007 Oct 03
1
R-2.6.0 is released
...e and internally generic for efficiency. They no longer dispatch on S3 methods for as.vector() (which was never documented). as.real() and as.numeric() remain as alternative names for as.double(). expm1(), log(), log1p(), log2(), log10(), gamma(), lgamma(), digamma() and trigamma() are now primitive. (Note that logb() is not.) The Math2 and Summary groups (round, signif, all, any, max, min, summ, prod, range) are now primitive. See under METHODS PACKAGE below for some consquences for S4 methods. o apropos() now sorts...