<<

TECHNOMETRICS@, VOL. 21, NO. 3, AUGUST 1979

A Modified 3-Spline Method for Evaluating the Euler Function

F. T. Lindstrom Department of Statistics Oregon State University Corvallis, OR 97331

The modified k splines are introduced. A simple linear model results from applying a variational principle to a modified 3-spline approximation of #’ on [1,2]. An approximation of I) is obtained analytically by integration. The coefficients needed to use this approximate method are tabulated.

KEY WORDS compartment I .V. drug distribution compartment models with random metabolism parameters (Lind- Splines Modified splines Strom and Birkes, [7]). Digamma function Assuming an iid sample of size n, (tl, C,), (tzCz), function * * * (t,,, C,), with tk being the kth time from adminis- Log gamma function tration of the drug (at time t = 0) and with the initial drug concentration being C, then the density of C is assumed to be fc(c) defined in equation (I). INTRODUCTION By applying the usual likelihood procedures we The Euler digamma function and its derivative (the obtain the MLE’s i and x of r and X respectively trigamma function) are often found in applications satisfying the following equations work where sampling is assumed to be done with gamma distributed data (Chapman [3]; Harter and ai = eh;’ 7 O= ~(fIog(~))“(~)““(~) (1) ,

for and of course q(r) is the Euler digamma function 0 < c I co, O

= #(1.6) + 1.2874 Pa+l(t) = p,(t) + a n+s(t - T,,)‘, T,, I t I t, = 2, which demonstrates the need to know #(1.6) so that (11) ti(4.6) may be computed. Our method supplies this where instead of the usual purely interpolatory con- “missing” piece very nicely. straints, it is assumed that the variational condition To be sure, for arguments r 2 10.0, the well-known asymptotic form K+4 ,. cm,)- W,)Y 1 W) - log(r) - - (10) 2r holds. (Abramowitz and Stegun [l], page 258) serves as an Before proceeding, it should be pointed out that approximation to G(r) and similarly for $‘(r) by dif- the low order 3 splines have been chosen because they ferentiating in (10) with respect to r. (1) tend to be less sensitive to errors in the data and (2) tend to give a curvature sign and magnitude more consistent with a slowly varying function such as the Modijied k splines $ function. Ahlberg, et al. [2] give the essential mathematical Carrying out the indicated minimization in equa- details of the family of k splines. Svante Wold [ 121 tion (12) yields the usual linear model design matrix has an excellent paper detailing the use of splines in notation (Draper and Smith [5])

TECHNOMETRICS@, VOL. 21, NO. 3, AUGUST 1979 MODIFIED 3-SPLINE METHOD FOR EVALUATING THE EULER DIGAMMA FUNCTION 309

Required continuity conditions at Knot points

f(t)

t t t t t nlfl tn n2+1 n n +l nlll L b bd LL n pi n T T t Tl T2 T3 Tk+l n-l n m

t--t

FIGURE1. Sketch of typical spline interpolation.

(X’X)/3 = X'Y (13) ary to choose m considerably larger than n + 4. This we will do shortly. The knot points are placed accord- where ing to the “thumb rules” stated by Wold [12]. x = (Xl, x2, x3, . . * Xn+,), X is m X (n + 4) and the columns ofX are TABLE I-$’ data from Abramowitz and Stegun [I]. x, = (1, 1, I, e-*,1) r 9’ (r) x2 = (11,L c3 . * * I fm)' x3 = (f1zt*2t32, * * *, tm2) 1.00 1.6449341

x, = (tl3tz3t32, * * f, tm3)' 1.05 1.5323573 1.10 1.4332992 1.15 1.3455594 x n,,, = (O,O,O * * - 0, (tn*+1 - TlJ3, * * - (&I - T,J3)’ 1.20 1.2673772 1.30 1.1342534 x n2+,= (0, o,o . * - 0, * . *o, (GzZ+l- TZY, 1.35 1.0771937 * - * (t, - T*)3) 1.40 1.0253566 1.45 0.9780788 1.55 0.8950541 x n+, = (0,O * * * 0, (fn,+l - Tn)” 1.60 0.8584319 . . . (t, - T,)‘) 1.65 0.8245905 and 1.70 0.7932328 1.80 0.7369741 1.85 0.7116545 Figure 1 shows a sketch of a typical spline approxi- 1.90 0.6879721 mation set up for either interpolatory or variational constraints. It should be remembered that for X’X to 1.95 0.6657762 be nonsingular we must have m > n + 4. It is custom- 2.00 0.6449341

TECHNOMETRICS@, VOL. 21, NO. 3, AUGUST 1979 310 F. T. LINDSTROM

TABLE 2-Knot points and a values for #’ data on [I, 21 for the modified 3-spline approximation. 4(t) = -Y + s,’ V(5) dt, lI?<2. (15)

Since y = 0.5772157 ao = 9.1153865 T1 = 1.25 a1 = -14.7073784 PI(f) = cl0 + a,t + a# + a3t3, 1

TABLE34’ data, $’ fitted, + actual. 9 predicted for the modified 3-spline method using three uniformly spaced knots.

r I/I' data I)' fitted A'=@;-$; $ act A = $,-$,

1.00 1.6449341 1.6448517 +0.0000824 -0.5772157 -0.5772157 0.0 1.05 1.5323573 1.5325455 -0.0001882 -0.4978450 -0.4978384 -0.0000076 1.10 1.4332992 1.4332729 +0.0000263 -0.4237549 -0.4237439 -0.0000110 1.15 1.3455594 1.3454189 +0.0001405 -0.3543267 -0.3543208 -0.0000059 1.20 1.2673772 1.2673683 +0.0000089 -0.2890399 -0.2890386 -0.0000013 1.30 1.1342534 1.1343796 -0.0001262 -0.1691909 -0.1691765 -0.0000144 1.35 1.0771937 1.0771889 +0.0000048 -0.1139280 -0.1139107 -0.0000173 1.40 1.0253566 1.0252964 +0.0000602 -0.0613845 -0.0613693 -0.0000152 1.45 0.9780788 0.9780646 +0.0000142 -0.0113164 -0.0113033 -0.0000131 1.55 0.8950541 0.8950918 -0.0000377 +0.0822226 +0.0822394 -0.0000168 1.60 0.8584319 0.8584250 +0.0000069 0.1260475 0.1260650 -0.0000175 1.65 0.8245905 0.8245676 +0.0000229 0.1681121 0.1681288 -0.0000167 1.70 0.7932328 0.7932313 +0.0000015 0.2085479 0.2085638 -0.0000159 1.80 0.7369741 0.7369922 -0.0000181 0.2849914 0.2850093 -0.0000179 1.85 0.7116545 0.7116533 +0.0000012 0.3212000 0.3212183 -0.0000183 1.90 0.6879721 0.6879630 +0.0000091 0.3561842 0.3562021 -0.0000179 1.95 0.6657762 0.6657734 +0.0000028 0.3900220 0.3900396 -0.0000176 2.00 0.6449341 0.6449365 -0.0000024 0.4227843 0.4228020 -0.0000177

TECHNOMETRICS@,VOL. 21, NO. 3, AUGUST 1979 MODIFIED 3-SPLINE METHOD FOR EVALUATING THE EULER DIGAMMA FUNCTION 311

(X’X))IX’Y. For the data given in Table 1, the seven for $ and 1c/’allows highly accurate approximate eval- values obtained are summarized in Table 2. uations of $ and $’ to be made on [ 1, 00). For the reader’s benefit, the spectral condition num- ber of the matrix (X’X) was calculated [13]. It turns ACKNOWLEDGEMENTS out to be of the order of 500. While some workers The author would like to express his thanks to his may consider X’X to be therefore ill conditioned it is colleagues, Professors Justus F. Seely and David S. not so ill conditioned that the IMSL subroutine (set Brikes, for their helpful suggestions and criticisms with a very strict ill conditioning tolerance) will not while writing this manuscript. This work was funded work, even under single precision arithmetic on the by grants number ES 00040 and ES 00210 from the OSU Computer Center’s CYBER 73 computer. National Institute of Environmental Health Science Table 3 summarizes the $’ data, $’ fitted, 1c/actual, Division of the U.S. Public Health Service. and rc/ predicted for the modified 3-spline method using three uniformly spaced knots. REFERENCES No effort has been made in either case to “opti- 111ABRAMOWITZ, M. and STEGUN, I. A. (1965). Handbook mize” the positions of T,, T,, and Ts. While it is of Mathemaiical Functions. New York: Dover. PI AHLBERG. J. H., NILSON, E. N. and WALSH, J. L. possible to optimize their positions on [l, 21, Wold (1967). The Theory of Splines and Their Applications. New [ 121 states that this often leads to little improvement. York: Academic Press. We therefore are willing to take his finding at face [31 CHAPMAN, D. G. (1956). Estimating the parameters of a value, The data summarized in Table 3 clearly show truncated gamma distribution. Ann. Math. Slat&., 27, 498- that we are guaranteed four decimal place accuracy in 506. 141CHOI, S. C. and WETTE, R. (1969). Maximum likelihood the approximation to $ in the case of the integrated estimation of the parameters of the gamma distribution and modified 3 spline. their bias. Technometrics. II, 683-690. Finally, it is a simple matter to combine formulas 151I DRAPER, N. R. and SMITH, H. (1966). AppliedRegression (17) and (8) into a subroutine to evaluate #(r) on [ 1, Analysis. New York: Wiley. a). This evaluation in turn can be used to find the [61I HARTER, H. L. and MOORE, A. H. (1965). Maximum likelihood estimation of the parameters of gamma and Wei- real zeros of f(r) = Ar - et”), 0 I A I 1, a need bull populations from complete and censored samples. Tech- which frequently arises in finding maximum likeli- nometrics, 7, 639-643. hood estimates in sampling from either the gamma or 171LINDSTROM, F. T. and BIRKES, D. S. (1978). On the log gamma distribution. estimation of parameters in a non-linear, one compartment stochastic open model by approximate likelihood functions. Submitted to J. Amer. Stafist. Assoc. SUMMARY 181NEYMAN, J. and SCOTT, E. (1967). Note on techniques of evaluation of single rain experiments. In Fifth Berkeley Sym- A simple technique for approximating the value of posium Proceedings, Vol. 5. the Euler digamma function # on the interval [ 1, 21 191PAIRMAN, E. (1954). Tables of the Digammaand Trigamma has been worked out. The technique is based on using Functions. Cambridge, England: Cambridge University Press. modified k-splines (here k = 3) and a variational 1101PRENTER, P. M. (1975). Splines and Variational Methods. New York: Wiley. constraint. Choosing nine decimal place $’ data (data 1111STACY, E. W. and MIHRAM, G. A. (1965). Parameter for the trigamma function) on the interval [ 1, 21 and estimation for a generalized gamma distribution. Tech- three uniformly spaced knots gives estimates of the nometrics, 7. 349-358. approximating polynomial parameters. Integration 1121WOLD, S. (1974). Spline functions in data analysis. Tech- of the approximating polynomial to +’ gives the nometrics, 16. l-11. [I31 YOUNG, D. M. and GREGORY, R. T. (1973). A Survey of highly accurate approximating polynomial to # on [ 1, Numerical Mathematics: Vol. II. Reading, MA: Addison- 21. Using the basic well-known recurrence formulas Wesley.

TECHNOMETRICS@, VOL. 21, NO. 3, AUGUST 1979