0

I want to calculate the derivative of digamma function in R.

R has an existing function called digamma, but I cannot find a function for the derivative of digamma function. Is it possible to write code for differentiated digamma function in R?

Thanks.

Dianafreedom
  • 391
  • 1
  • 13

1 Answers1

3

Sure, it is called trigamma

q <- trigamma(3)

There is also psigamma: psigamma(x, deriv) (deriv >= 0) computes the deriv-th derivative of ψ(x).

Severin Pappadeux
  • 18,636
  • 3
  • 38
  • 64