正在加载图片...
702 Chapter 15.Modeling of Data This implies p(z)=log (1+ 2 (z)= 1+52 (Lorentzian) (15.7.10) Notice that the function occurs as a weighting function in the generalized normal equations (15.7.5).For normally distributed errors,equation (15.7.6)says that the more deviant the points,the greater the weight.By contrast,when tails are somewhat more prominent,as in(15.7.7),then(15.7.8)says that all deviant points get the same relative weight,with only the sign information used.Finally,when the tails are even larger,(15.7.10)says the increases with deviation,then starts decreasing,so that very deviant points-the true outliers-are not counted at all in the estimation of the parameters. This general idea,that the weight given individual points should first increase 8 鱼君 with deviation,then decrease,motivates some additional prescriptions for which do not especially correspond to standard,textbook probability distributions.Two examples are RECIPES Andrew's sine 9 (z) sin(z/c) 2<CT 0 Cn (15.7.11) If the measurement errors happen to be normal after all,with standard deviations, then it can be shown that the optimal value for the constant c is c =2.1. Tukey's biweight 三孕是今 9 2(1-221c2)2 a<c sum IENTIFIC (z)= 0 a>c (15.7.12) 6 where the optimal value of c for normal errors is c =6.0. Numerical Calculation of M-Estimates (ISBN To fit a model by means of an M-estimate,you first decide which M-estimate 10.621 you want,that is,which matching pair p,you want to use.We rather like Recipes Numerica (15.7.8)or(15.7.10). 431 You then have to make an unpleasant choice between two fairly difficult E Recipes problems.Either find the solution of the nonlinear set of M equations(15.7.5),or else minimize the single function in M variables(15.7.3). (outside Notice that the function (15.7.8)has a discontinuous and a discontinuous North derivative for p.Such discontinuities frequently wreak havoc on both general nonlinear equation solvers and general function minimizing routines.You might now think of rejecting(15.7.8)in favor of (15.7.10),which is smoother.However, you will find that the latter choice is also bad news for many general equation solving or minimization routines:small changes in the fitted parameters can drive (z) off its peak into one or the other of its asymptotically small regimes.Therefore, different terms in the equation spring into or out of action(almost as bad as analytic discontinuities). Don't despair.If your computer budget (or,for personal computers,patience) is up to it,this is an excellent application for the downhill simplex minimization702 Chapter 15. Modeling of Data Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). This implies ρ(z) = log 1 + 1 2 z2  ψ(z) = z 1 + 1 2 z2 (Lorentzian) (15.7.10) Notice that the ψ function occurs as a weighting function in the generalized normal equations (15.7.5). For normally distributed errors, equation (15.7.6) says that the more deviant the points, the greater the weight. By contrast, when tails are somewhat more prominent, as in (15.7.7), then (15.7.8) says that all deviant points get the same relative weight, with only the sign information used. Finally, when the tails are even larger, (15.7.10) says the ψ increases with deviation, then starts decreasing, so that very deviant points — the true outliers — are not counted at all in the estimation of the parameters. This general idea, that the weight given individual points should first increase with deviation, then decrease, motivates some additional prescriptions for ψ which do not especially correspond to standard, textbook probability distributions. Two examples are Andrew’s sine ψ(z) =  sin(z/c) 0 |z| < cπ |z| > cπ (15.7.11) If the measurement errors happen to be normal after all, with standard deviations σ i, then it can be shown that the optimal value for the constant c is c = 2.1. Tukey’s biweight ψ(z) =  z(1 − z2/c2)2 0 |z| < c |z| > c (15.7.12) where the optimal value of c for normal errors is c = 6.0. Numerical Calculation of M-Estimates To fit a model by means of an M-estimate, you first decide which M-estimate you want, that is, which matching pair ρ, ψ you want to use. We rather like (15.7.8) or (15.7.10). You then have to make an unpleasant choice between two fairly difficult problems. Either find the solution of the nonlinear set of M equations (15.7.5), or else minimize the single function in M variables (15.7.3). Notice that the function (15.7.8) has a discontinuous ψ, and a discontinuous derivative for ρ. Such discontinuities frequently wreak havoc on both general nonlinear equation solvers and general function minimizing routines. You might now think of rejecting (15.7.8) in favor of (15.7.10), which is smoother. However, you will find that the latter choice is also bad news for many general equation solving or minimization routines: small changes in the fitted parameters can drive ψ(z) off its peak into one or the other of its asymptotically small regimes. Therefore, different terms in the equation spring into or out of action (almost as bad as analytic discontinuities). Don’t despair. If your computer budget (or, for personal computers, patience) is up to it, this is an excellent application for the downhill simplex minimization
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有