Next: dim() Up: MacAnova Help File Previous: diag()   Contents

digamma()

Usage:
digamma(x), x REAL with positive elements or a structure with REAL
  components with positive elements.



Keywords: transformations
digamma(x) returns the digamma function (first derivative of
log(gamma(x))) of the elements of x, when x is a REAL scalar, vector,
matrix or array with positive elements.  The result has the same shape
as x.

digamma(x) is equivalent to polygamma(x,0).

When x is a structure, all of whose non-structure components are REAL
with positive elements, digamma(x) returns a structure of the same shape
and with the same component names as x with each non-structure component
transformed by digamma().

digamma(x) can also be used when x is a CHARACTER variable.  The result
is a CHARACTER variable of the same shape as x describing the
transformation.  See the example below.

Any element of x that is "" or starts with '@', '(', '[', '{', '<', '/'
or '\' is not modified.  This can be useful for creating labels for a
transformed variable.

Examples:
  Cmd> digamma(run(10)) # or polygamma(run(10),0) or polygamma(run(10))
  (1)    -0.57722     0.42278     0.92278      1.2561      1.5061
  (6)      1.7061      1.8728      2.0156      2.1406      2.2518

  Cmd> digamma(vector("x","y")) # CHARACTER argument
  (1) "digamma(x)"
  (2) "digamma(y)"

See also polygamma(), lgamma(), 'transformations'


Gary Oehlert 2003-01-15