Home
User Manual for STABLE 5.1 Signal Filtering Module 1.1 matlab
Contents
1. 14 2 5 6 Quick stable likelihood computation o o 14 2 5 7 Quick stable score nonlinear function o 15 Discrete stable distributions o 15 STABLE User Manual 3 2 6 1 Discrete stable density o e e e 15 2 6 2 Quick discrete stable density 2 o e 15 2 6 3 Discrete stable cumulative distribution function 0 0 15 2 6 4 Quick discrete stable cumulative distribution function 15 2 6 5 Simulate discrete stable random variates o o o 16 2 6 6 Simulate discrete stable random variates with specified saturation probability 16 2 6 7 Find scale y to have a specified saturation probability for a discrete stable distribution 16 2 6 8 Discrete maximum likelihood estimation o o 16 3 Multivariate Stable Introduction 17 4 Multivariate Stable Functions 18 4 1 Define multivariate stable distribution 0 002 000 eee eee eee 18 4 1 1 Independent components 19 4 1 2 Isotropic Stable vos A ee ke 19 4 1 3 Ellipticalstable cen Ge nn Pie Be Re A ee 19 4 1 4 Discrete spectral measure 0 000 000 AROE E 19 4 1 5 Discrete spectral measure in 2 dimensions 0 20 4 1 6 Undefine a stable distribution e e e 20 4 2 Basic AUNCUONS ate EI O AO AAA e 20 422 17 Density Tnction vaa dl ee aed Re hee BPS SW a 2
2. For the confidence interval is theta 4 sigtheta 4 These values do not make sense when a parameter is at the boundary of the parameter space e g a 20r PB 1 These values are numerically approximated using a grid of numerically computed values in Nolan 2001 The values have limited accuracy especially when a lt 1 2 2 12 Information matrix for stable parameters matlab function stablemleinfomatrix theta Returns the 4 x 4 information matrix for maximum likelihood estimation of the stable parameters for parameter values theta This is done in the continuous O parameterization These are approximate values interpolated from a grid of numerically computed values in Nolan 2001 for a gt 0 5 The values have limited accuracy especially when a lt 1 2 2 13 Log likelihood computation matlab function stableloglik x theta param Compute the log likelihood of the data assuming an underlying stable distribution with the specified parameters 2 2 14 Chi squared goodness of fit test matlab function stablechisq x theta nclasses param Compute chi squared goodness of fit statistic for the data in 11 n using nclass equally probable classes bins 2 2 15 Kolmogorov Smirnov goodness of fit test matlab function stableksgof x theta method param This function computes the Kolmogorov Smirnov two sided test statistic D sup F x F x o00 lt x lt oo STABLE User Manual 10 where F is
3. method2d is the method to use in estimating bivari ate distribution Use method2d 1 for Rachev Xin Cheng method met hod2d 2 for projection method method2d 3 for empirical characteristic function method The methods are described in Nolan et al 2001 see Nolan and Panorska 1997 for some discussion of suggested values and diagnostics Suggest using nspect ral 40 method1d 3 method2d 2 param 1 The function returns a list structure that contains information about the fit which is always done as a discrete spectral measure The fields in the fit are the estimated value of a the estimated shift location vector 0 angle which is a uniform grid from 0 to 27 of length nspect ral and Lambda for the estimated weights at each position 4 3 2 Estimate parameter functions matlab function mvstablefitparfn2d x angle methodld param Estimate the parameter functions for the bivariate data in x The data is projected in each direction given by angle and the parameters are estimated in the param parameterization met hod1d is the univariate method used to estimate the parameters see Section 2 2 1 for codes The result is a matrix of dimension length x 5 The columns of the result are 1 for the angle 2 for the estimate of a 3 for the estimate of 8 4 for the estimate of y 5 for the estimate of at that angle STABLE User Manual 22 4 3 3 Fit an elliptical stable distribution to multivariate data matlab function mvstablefitelli
4. 16 stablefilter 29 stablefit 7 stablefitdmle 16 stablefitecf 8 stablefitmle 7 stablefitmleci 9 stablefitmlerestricted 7 stablefitquant 8 stablegettolerance 12 stablehazard 6 stableinv 6 stableksgof 9 stableloglik 9 stablelrt 10 stablemleinfomatrix 9 stablemode 12 stablenonlinfn 7 stableomega 13 stablepdf 5 stablepdfderiv 6 stablepdfdiscrete 15 stablepdfsecondderiv 7 stablepdfseriesorigin 13 stablepdfseriestail 13 stableqkcdf 14 stableqkcdfdiscrete 15 stableqkclogpdf 14 stableqkhazard 14 stableqkinv 14 stableqkloglik 14 stableqknonlinfn 15 stableqkpdf 14 stableqkpdfdiscrete 15 stableregression 10 stablernd 6 stablernddiscrete 16 stablernddiscrete2 16 stablesettolerance 12 stablesigfilter 27 stableversion 11 33
5. P and A K Panorska 1997 Data analysis for heavy tailed multivariate samples Comm in Stat Stochastic Models 13 687 702 Nolan J P and B Rajput 1995 Calculation of multidimensional stable densities Commun Statist Simula 24 551 556 Nunez R C J G Gonzalez G R Arce and J P Nolan 2008 Fast and accurate computation of the myriad filter via branch and bound search EEE Transactions on Signal Processing 56 3340 3346 Pitas I and A Venetsanopoulos 1990 Nonlinear Digital Filters Princtiples and Applications Kluwer Academic Publishers Index matlab functions 8 9 11 29 meanfilter 28 medianfilter 28 mvstableamplitudecdf 22 mvstableamplitudeinv 22 mvstableamplitudepdf 22 mvstableamplitudernd 22 mvstableamplitudescore 23 mvstablecdf 20 mvstablecdfMC 21 mvstableconvert 24 mvstablediscspecmeas 19 mvstablediscspecmeas2d 20 mvstableelliptical 19 mvstablefindrectangle 21 mvstablefit 21 mvstablefitamplitude 22 mvstablefitelliptical 22 mvstablefitparfn2d 21 mvstableindep 19 mvstableinfo 24 mvstableisotropic 19 mvstableparfn2d 24 mvstablepdf 20 mvstablepdfdiscrete2d 24 mvstableqkamplitudepdf2d 23 mvstableqkloglikisotropic2d 23 mvstablernd 21 mvstableundefine 20 myriadfilter 28 selectionfilter 29 stablecdf 6 stablecdfdiscrete 15 stablecdfseriesorigin 13 stablecdfseriestail 13 stablechisq 9 stableconvert 12 stablecostfn 29 stablediscretefindgamma
6. d lt 98 There seems to be a relative error of approximately 3 for large r 4 5 Faster approximations to multivariate routines There are a limited number of functions for quickly calculating multivariate functions in the 2 dimensional isotropic case Such a distribution is specified by the index of stability a the scale yo and the location 01 62 Because the description is simple these functions use those arguments directly and do not use a distribution descriptor 4 5 1 Quick log likelihood for bivariate isotropic case matlab function mvstableqkloglikisotropic2d x alpha gamma0 delta Compute the log likelihood of the bivariate isotropic stable data in x with stable index alpha scale gamma 0 and location vector delta An internal approximation is used to compute the single value L a Yo 6 x1 Asa Xn log x x la 70 i l This function is designed to compute the log likelihood for a fixed many times In this case it is much faster than trying to compute the right hand side above using the bivariate pdf routine in Section 4 2 1 It is also more accurate than that routine especially on the tails The program initially computes an approximation that depends on a if a changes the approximation must be recomputed and it will be slower 4 5 2 Quick amplitude density in bivariate case matlab function mvstableqkamplitudepdf2d r alpha gamma0 Compute the amplitude function fr r a yo d 2 for a 2
7. dimensional isotropic stable vector For large n it is much faster than the function in Section 4 4 2 4 6 Bivariate discrete stable distribution A bivariate discrete stable distribution is defined by digitizing and truncating a continuous bivariate stable distribution X X1 X2 discrete Y Y Y2 7 has components Y integer part of max a min X b where cutoff a b are the upper and lower cutoff values Note that the same cutoff is used for both components of X These distributions arise in signal processing where a bivariate continuous quantity is quantized digitized and limited accuracy is kept It is assumed that the cutoff values are integers The satura tion probability is Psat P X1 lt a 1 2 P X gt b 1 2 P X2 lt a 1 2 P X2 gt b 1 2 and is a measure of how much of the distribution is lost by truncating at the cutoff values In the internal routines the x values are integers The R Mathematica and matlab interfaces store these integer values in double precision numbers STABLE User Manual 24 4 6 1 Discrete bivariate density matlab function mvstablepdfdiscrete2d dist x cutoff eps method Compute the pdf of a discrete bivariate stable distribution x should be a 2 x n matrix of integer values cutoff is a vector of length 2 with upper and lower cutoff values for the truncation The typical value for cutoff is 128 127 both components of X1 X2 are truncated at the same value The func
8. distributions Communications in Statistics Theory and Methods 35 245 256 Kogon S and D Williams 1998 Characteristic function based estimation of stable parameters In R Adler R Feldman and M Taqqu Eds A Practical Guide to Heavy Tailed Data pp 311 338 Boston MA Birkhauser McCulloch J H 1986 Simple consistent estimators of stable distribution parameters Communications in Statistics Simulation and Computation 15 1109 1136 Nikias C L and M Shao 1995 Signal Processing with Alpha Stable Distributions and Applications New York Wiley Nolan J P 1997 Numerical calculation of stable densities and distribution functions Commun Statist Stochastic Models 13 759 774 Nolan J P 2001 Maximum likelihood estimation of stable parameters In O E Barndorff Nielsen T Mikosch and S I Resnick Eds L vy Processes Theory and Applications Boston Birkhauser Nolan J P 2008 July Advances in nonlinear signal processing for heavy tailed noise Intl Workshop in Applied Probability 2008 Nolan J P 2010 Stable Distributions Models for Heavy Tailed Data Boston Birkhauser In progress Chapter 1 online at academic2 american edu jpnolan Nolan J P and D Ojeda 2006 Linear regression with general stable errors Preprint Nolan J P A Panorska and J H McCulloch 2001 Estimation of stable spectral measures Mathematical and Computer Modelling 34 1113 1122 Nolan J
9. e 2 then a is set to 2 and 3 is set to 0 2 Near a 1 but not Cauchy if a 1 lt e and 8 gt e then a is set to 1 and 8 is left unchanged This is to avoid computations involving 8 tan ra 2 which blows up as a gt 1 if 8 4 0 3 Near Cauchy case if a 1 lt e and 8 lt e then ais set to 1 and Pis set to 0 4 Near L vy case if a 1 2 lt e and G 1 lt e then ais set to 1 2 and is set to 1 if a 1 2 lt e and 8 1 lt e then a is set to 1 2 and is set to 1 STABLE User Manual code type meaning 101 error Invalid input parameter 102 warning Accuracy warning alpha lt 1 103 warning vmax exceeded in mvstablepdf 104 error Too many points in spectral measure 105 error nspectral must be divisible by 4 106 error This parameterization is not allowed in this function 107 error Too few uniform 0 1 input values for simulation 108 error Distribution not defined 109 error mvstablecdf not implemented for nonsymmetric case 110 error Matrix is not positive definite 111 error alpha must be at least 0 8 112 error Definition error 113 error Dimension is greater than the max allowed 115 error Spline error 150 error Not enough memory 151 error Error in a subroutine Table 2 Multivariate error codes The signal filtering module returns error codes in the range 1000 2000 code type meaning 1100 error Too few input
10. e The special case of the previous one is when angle 0 7 2 This corresponds to a distribution with independent components Both density and cdf are calculated in terms of products of univariate density and cdf respectively e If all elements of beta are 0 the distribution is symmetric Cumulative distribution function calcula tions only work in the symmetric case though Monte Carlo based cdf estimation works for any case you can simulate including skewed 4 1 6 Undefine a stable distribution matlab function mvstableundefine dist Clears the definition of the stable distribution dist 4 2 Basic functions 4 2 1 Density function matlab function mvstablepdf dist x Computes the density f x for stable distribution dist at each value in x Note this routine as sumes that the density exists The density will not exist in the discrete spectral measure case if the mass is concentrated on a proper subspace of the domain In the independent case the program computes the pdf as a product of univariate stable pdfs There is one other case that can be evaluated in terms of univariate pdfs 1f the spectral measure is discrete AND the number of point masses is equal the dimension of the problem Otherwise only 2 dimensional computations can be done The symmetric case uses the method in Abdul Hamid and Nolan 1998 the nonsymmetric case uses the method in Nolan and Rajput 1995 The symmetric case is faster and more accurate than the n
11. if the components are independent OR the spectral mea sure has exactly d point masses c calculate the cdf using mvstablecdf if the components are independent or d calculate the cdf using mvstablecdfMC by Monte Carlo estimation for any type of distribution The accuracy of the pdf and cdf calculations are limited In all cases X is a column vector this is important to remember when you specify x for calculating say a pdf 4 1 Define multivariate stable distribution The interfaced versions of STABLE have the ability to work with multiple distributions When a multivariate stable distribution is defined a distribution descriptor is returned That descriptor must be used when computing quantities for that distribution Note The descriptor should not be changed by a user The descriptor may change between calls and contents may vary in future versions of STABLE There are different functions used to define each of the different types of distributions that STABLE can work with They are described below A simple matlab example that defines two distributions and works with them is Define two bivariate stable distributions one isotropic and STABLE User Manual 19 one with indep components distl mvstableisotropic 1 3 2 1 0 0 dist2 mvstableindep 1 3 0 0 1 1 0 0 0 compute the pdf for both distributions x 0011 0101 yl mvstablepdf dist1 x y2 mvstablepdf dist2 x simulate from both
12. nonlinear function for a stable distribution g a f 1 f x d dx ln f x The algorithm used depends on the value of method When method 1 stablegqkpdf is used to compute f x and in the numerical evaluation of f x When method 2 stablescorefn is used to compute g x on a grid then a spline is fit to those values The resulting spline is used to approxi mate g x If n is large this is noticeably faster than either stablescorefn or method 1 above When method 3 a rational function approximation is used to approximate g x This is the fastest method but the accuracy depends on the values of alpha and beta If alpha is between 1 and 1 9 and beta is near 0 the approximation is good 2 6 Discrete stable distributions Given a stable distribution X S a 3 7 6 param and a pair of cutoff values a lt b the random variable Y integer part of max a min X b is a discrete stable distribution These distribution arise in signal processing where a continuous quantity is quantized digitized and limited accuracy is kept It is assumed that the cutoff values are integers The saturation probability is P X lt a 1 2 P X gt b 1 2 and is a measure of how much of the distribution is lost by truncating at the cutoff values In the routines below the cutoff is specified by a vector of length 2 cutoff a b In this section X will always refer to the continuous stable distribution while Y will always refer to a discrete qu
13. the stable cdf with parameters a theta 1 8 theta 2 y theta 3 theta 4 and is the sample cdf of the data in x Use method 0 for quick computations stableqkcdf is used to compute cdf use method 1 for slower computations stablecaf is used to compute cdf The routine returns the observed value of D and an estimate of the tail probability P D gt d i e the significance level of the test This tail probability is calculated using Stephen s approximation to the limiting distribution e g n 0 12 0 11n 2 D is close to the limiting Smirnov distribution This is close to n 2 D for large n and a better approximation on the tails for small n Note this calculation is not very accurate if the tail probability is large but these cases aren t of much interest in a goodness of fit test If you don t like this approximation the function returns D and you can compute your own tail probability WARNING the computation of the significance level is based on the assumption that the parameter values thet a a 3 7 6 were chosen independently of the data If the parameters were estimated from the data then this tail probability will be an overestimate of the significance level 2 2 16 Likelihood ratio test matlab function stablelrt x alphabnds betabnds This function computes the likelihood ratio Ly L where Lo is the maximum likelihood of the data x under the assumption that x is an i i d sample from a stable dis
14. values in sdiscretemle 10 error beta must be 0 to use this function 11 error beta near 1 or 1 does not work in this function 12 error sinc error in sfitfracmoment 13 error Internal error in sfitlogabs 14 error Data value near zero in sfitfracmoment or sfitlogabs 15 error Error in subroutine 16 error Internal error while computing derivatives 17 error f a and f b have the same signs 18 error Too many function evaluations 19 error Not enough memory 20 error X zero value 21 error Internal error in quickstable 30 error Two parameterization is required in skewed case Table 1 Univariate error codes Warning code 7 can arise in several ways The purpose of this warning is to avoid numerical problems in internal calculations that can occur near the boundary in the parameter space or to use special cases to increase speed but to let the user know that something nonstandard is being done In the following discussion let e the value of tolerance 4 The default value is e 0 01 You can change the value of tolerance 4 by using the function stablesettolerance above and query it s value by using function stablegettolerance The default value was picked in an ad hoc way you can make it smaller even 0 if you wish to calculate certain quantities in one of the cases below But be aware that numerical errors may arise Special cases where warning code 7 occur are 1 a near 2 if a 2
15. 0 4 22 Cumulative functio n os 2s hte tle eee eve OR Ge we Arve ak es ee oe 20 4 2 3 Cumulative function Monte Carlo 0 2 00 00 2 eee eee 21 4 24 Multivariate simulation oaa ee 21 4 2 5 Find a rectangle with probability at least p oaa a 21 4 3 Statistical TUNCUONS s neee a a a Eee ew a a SRO Vy ae Ree A A 21 4 3 1 Estimate a discrete spectral measure fit a stable distribution to bivariate data 21 4 3 2 Estimate parameter functions 0 000000 000 4 21 4 3 3 Fit an elliptical stable distribution to multivariate data 22 4 4 Amplitude distribution sers oora k 0 E aa ae ee 22 4 4 1 Amplitude cumulative distribution function 22 44 2 Amplitudedensity e 00 R E y E a ee ee 22 44 3 Amplitude quantiles e 22 4 4 4 Simulate amplitude distribution e e 22 4 43 Fitcamplitude data ys ermee Sov beth ee Bee rE a oe E Pee 22 44 6 Amplitude score function 2 0 0 0 0020 00 000 23 4 5 Faster approximations to multivariate routines 2 ee ee 23 4 5 1 Quick log likelihood for bivariate isotropic case 2 ee ee 23 4 5 2 Quick amplitude density in bivariate Case a 23 4 6 Bivariate discrete stable distribution o o e e e 23 4 6 1 Discrete bivariate density 2 0 0 002 000 0008 24 4 7 Multivariate information
16. 1 tolerance 10 is used to limit how low a quantile can be searched for The default value is p 107 0 quantiles below p will be set to the left endpoint of the support of the distribution which may be oo Likewise quantiles above 1 p will be set to the right endpoint of the support of the distribution which may be 00 2 tolerance 2 is the relative error used when searching for the quantile The search tries to get full precision but if it can t it will stop when the relative error is less than tolerance 2 2 1 4 Simulate stable random variates matlab function stablernd n theta param This function simulates n stable random variates 1 12 n with parameters a 5 y 9 in parame terization param It is based on Chambers et al 1976 2 1 5 Stable hazard function matlab function stablehazard x theta param This function computes the hazard function for a stable distribution h f a 1 F a i n 1 pees 2 1 6 Derivative of stable densities matlab function stablepdfderiv x theta param This function computes the derivative of stable density functions y f a f x Ja 3 7 6 param 1 1 n STABLE User Manual 7 2 1 7 Second derivative of stable densities matlab function stablepdfsecondderiv x theta param This function computes the second derivative of stable density functions y f xi f ala 3 7 6 param t 1 N 2 1 8 Stable score nonlinear functio
17. User Manual for STABLE 5 1 Signal Filtering Module 1 1 matlab Version Abstract This manual gives information about the STABLE library which computes basic quantities for univari ate stable distributions densities cumulative distribution functions quantiles and simulation Statistical routines are given for fitting stable distributions to data and assessing the fit Utility routines give in formation about the program and perform related calculations Quick spline approximations of the basic functions are provided Densities cumulative distribution functions and simulation for discrete quantized stable distributions are described The multivariate module gives functions to compute bivariate stable densities simulate stable random vectors and fit bivariate stable data In the radially symmetric case the amplitude densities cumulative distribution functions quantiles are computed for dimension up to 100 The signal filtering module includes functions to compute non linear filters for signals with heavy tailed noise Specifically a novel stable filter based on stably distributed noise is implemented 2002 2009 by Robust Analysis Inc 6618 Allegheny Avenue Takoma Park MD 20912 4616 USA phone and fax 301 891 8484 www RobustAnalysis com Revised 9 July 2009 processed July 11 2009 STABLE User Manual 2 Contents 1 Univariate Stable Introduction 2 Univariate Stable Functions 2 1 2 2 2 3 2 4 2 5 2 6 Wn B
18. a and 5 Each routine has a setup time and if you change a or 6 that setup code must be rerun It can be slower to run these routines than the basic routines above if you only want to calculate the quantity at a few x values These routines work for 0 2 lt a lt 2 and all 1 lt 6 lt 1 2 5 1 Quick stable density computation matlab function stableqkpdf x theta param Call is identical to Section 2 1 1 results are approximately the same 2 5 2 Quick stable cumulative computation matlab function stablegkcdf x theta param Call is identical to Section 2 1 2 results are approximately the same 2 5 3 Quick stable log pdf computation matlab function stableqkclogpdf x theta param Approximates log pdf for stable distributions Results are approximately the same as log f x 2 5 4 Quick stable quantile computation matlab function stableqkinv p theta param Call is identical to Section 2 1 3 but much faster Note the comments in that section about extreme upper quantiles 2 5 5 Quick stable hazard function computation matlab function stableqkhazard x theta param Call is identical to Section 2 1 5 2 5 6 Quick stable likelihood computation matlab function stableqkloglik x theta param Call is identical to Section 2 2 13 STABLE User Manual 15 2 5 7 Quick stable score nonlinear function matlab function stableqknonlinfn x theta method param This function approximates the score or
19. al utility functions o e e o 24 4 7 1 Information about a distribution o eee ee eee 24 4 7 2 Compute projection parameter functions o e 24 4 7 3 Multivariate convert parameterization e o o 24 5 Signal Filtering Introduction 25 5 1 The filter information Structure e 26 6 Signal Filtering Functions 27 GL ENtOrTUNCUONAS 24 ean a A e A ee ee a Ren 27 6 1 1 Stable Signal filtering s aans aab ee i a a e eh ee apo 27 612 1 Mean filter seita oe oo a e Be T eee S 28 6 153 Median filter lt e nd iris ee ee be ba o do e a 28 6 1 4 Myriad filter occ o Poe ee be 28 STABLE User Manual 6 1 5 Selection filter 6 1 6 Stable filter 6 2 Costfunctions 6 2 1 Cost function vectorized 6 2 2 Cost function at a single point 7 Error return codes References Index 29 29 29 29 29 30 32 32 STABLE User Manual 5 1 Univariate Stable Introduction Stable distributions are a class of probability distributions that generalize the normal distribution Stable distributions are a four parameter family a is the tail index or index of stability and is in the range 0 lt a lt 2 is a skewness parameter and is in the range 1 lt lt 1 y is a scale parameter and must be positive and 6 is a location parameter an arbitrary real number There are numerous meanings for these parameters We wi
20. antized integer valued distribution In the internal routines the x values are integers The matlab R Mathematica interfaces use double pre cision values 2 6 1 Discrete stable density matlab function stablepdfdiscrete x theta cutoff param Calculates f P Y 2 i 1 n 2 6 2 Quick discrete stable density matlab function stableqkpdfdiscrete x theta cutoff param Calculates f P Y x i 1 n Faster than above less accurate 2 6 3 Discrete stable cumulative distribution function matlab function stablecdfdiscrete x theta cutoff param Calculates F P Y lt 2 1 1 n 2 6 4 Quick discrete stable cumulative distribution function matlab function stableqkcdfdiscrete x theta cutoff param Calculates F P Y lt x i 1 n Faster than above less accurate STABLE User Manual 16 2 6 5 Simulate discrete stable random variates matlab function stablernddiscrete n theta cutoff param Simulates discrete stable random variates with the specified parameters and cutoffs 2 6 6 Simulate discrete stable random variates with specified saturation probability matlab function stablernddiscrete2 n theta cutoff psaturation param Simulates discrete stable random variates where the scale is computed internally to make the saturation probability psaturation Note that in cases where the stable parameters are passed individually gamma is NOT used In the cases where the vect
21. asic fUnCtiOnSs 4 e rl A Qo BS ETA Gs EI E ERY E AIG E Dies 2 11 Stableidensiti s ot ean a Bg ee Be eG ee ee ee 2 1 2 Stable distribution functions 13 Stable quantiles dell ey a Ey Baste A ok Oh ace ee ae 2 1 4 Simulate stable random variates es 2 1 5 Stable hazard function 2 1 6 Derivative of stable densities ee 2 1 7 Second derivative of stable densities 2 1 8 Stable score nonlinear function Statistical functioms disis Qt A ERIE ee A aed Me IA Rie AGE AE 2 2 1 Estimating stable parameters e 2 2 2 Maximum likelihood estimation 2 2 3 Maximum likelihood estimation with restricted parameters 2 2 4 Maximum likelihood estimation with search control 2 2 5 Quantile based estimation 0 0 ee ee 2 2 6 Empirical characteristic function estimation o o 2 2 7 Fractional moment estimation 2 2 8 Log absolute moment estimation o 2 2 9 Quantile based estimation version 2 2 0 eee ee ee 2 2 10 U statistic based estimation 2 2 11 Confidence intervals for ML estimation 2 2 12 Information matrix for stable parameters o e 00002 e ee 2 2 13 Log likelihood computation e 2 2 14 Chi squared goodness of fit test o o e NNVwNOw0DVw0 ww 00 00 00 00 00 0 N II Y Al DO DODO0OO0ssur Ur Yu 2 2 15 Kolmogorov Smirno
22. cients e binit is the initial vector of coefficients from the trimmed regression e alpha beta gamma delta are the stable parameters estimated from the residuals They can be regarded as nuisance parameters if you only care about the coefficients Note that all parameters are in the O parameterization You can convert to another representation using the convert parameterization function in Section 2 3 5 Note that in the non Gaussian stable case some of the traditional assumptions in regression are no longer true In particular it is NOT always the case that Fe 0 First if lt 1 the heavy tails will mean that Fe is undefined Second in the non symmetric case 3 4 0 even if gt 1 we do not require Fe 0 Instead we set delta so that the mode of e is zero The reason for this is to make the regression line go through the center of the data points 2 2 18 Stable regression profile likelihood parameter confidence intervals matlab function not implemented in matlab Compute confidence intervals for regression parameters This function uses profile likelihood for the specific data set to compute confidence intervals for each parameter including the stable parameters a 6 and y as well as the regression coefficients b bx It is assumed that the user has already called the regression routine fit lt stable regression x y trimprob stable regression profile likelihood fit x y There are two optional arguments p va
23. d using an optimization routine This program and the numerical computation of confidence intervals below are described in Nolan 2001 For speed reasons the quick log likelihood routine is used to approximate the likelihood this is where the restriction gt 0 4 comes from 2 2 3 Maximum likelihood estimation with restricted parameters matlab function stablefitmlerestricted x theta param restriction This is a modified version of maximum likelihood estimation where some parameters can be estimated while the others are restricted to a fixed value The function receives theta alpha beta gamma delta and if restriction i 1 then theta i is fixed STABLE User Manual 8 2 2 4 Maximum likelihood estimation with search control matlab function not implemented in matlab This is maximum likelihood estimation with greater control over the search and ranges for the parameters It is used internally 2 2 5 Quantile based estimation matlab function stablefitquant x param Estimate stable parameters for the data in x using the quantile based on the method of McCulloch 1986 It sometimes has problems when a is small say lt 1 2 and the data is highly skewed Try the modified version below in such cases 2 2 6 Empirical characteristic function estimation matlab function stablefitecf x gamma0 delta0 param Estimate stable parameters for the data in x using the empirical characteristic function based method of Kou
24. distributions zl mvstablernd dist1 10000 z2 mvstablernd dist2 10000 4 1 1 Independent components matlab function mvstableindep alpha beta gamma delta param Define a multivariate stable distribution with independent components with characteristic function 6 beta gamma and delta should be vectors of length d the dimension of the distribution 4 1 2 Isotropic stable matlab function mvstableisotropic alpha d gamma0 delta iparam Define a multivariate isotropic stable distribution with characteristic function 4 d is the dimension of the distribution gamma0 is the scale parameter delta is the location vector 4 1 3 Elliptical stable matlab function mvstableelliptical alpha R delta iparam Define a multivariate elliptically contoured sub Gaussian stable distribution with characteristic function 5 The dimension of the distribution is determined from the size of R a positive definite d x d shape matrix and delta is the location vector 4 1 4 Discrete spectral measure matlab function mvstablediscspecmeas alpha s lambda beta delta param Define a multivariate stable distribution with discrete spectral measure having characteristic function 7 s should be ad x nlambda matrix specifying the location of the point masses as columns lambda should be a row vector of length nlambda containing the weights beta should be a row vector of length nlambda specifying the skewness at each point mass d
25. e global min Finally filters should be fast While we cannot match the speed of a simple linear filter stable filters provided by the STABLE program makes it possible to use non linear filters in practical problems for the first time The STABLE Signal Filtering routines also implement the linear filter myriad filter selection filter and the median filter More information on non linear filters can be found in Arce 2005 Nunez et al 2008 Nolan 2008 Pitas and Venetsanopoulos 1990 and Astola and Kuosmanen 1997 5 1 The filter information structure When a stable filter is used numerous pieces on information must be supplied The STABLE routine uses a structure called filterinfo to define all the parameters of the filter Not all of these are required for every filter Most users will use BASIC mode with a minimum number of parameters Expert users can use ADVANCED mode but must be careful about specifying all the needed parameters What values are needed are specified in the individual function definitions below The following are the fields of filterinfo e type The type of filter chosen It can be MEAN_FILTER MEDIAN FILTER MYRIAD FILTER STABLE User Manual 27 SELECTION FILTER or STABLE _FILTER mode BASIC filter mode or ADVANCED filter mode In the BASIC mode only required param eters are needed and defaults are used for the others In ADVANCED mode the caller must specify a
26. e type field must be filled in with one of the following MEAN FILTER MEDIAN_FILTER MYRIAD FILTER SELECTION FILTER or STABLE FILTER For the myriad selection or stable filter other fields must be specified as described in the respective section below The functions below each take a single window and compute a single value as the output of the filter for that window 6 1 2 Mean filter matlab function meanfilter s w Calculates the weighted mean of a set of n samples S where each sample is weighted by S The mean of the set of samples is Y _ Wi Si 6 1 3 Median filter matlab function medianfilter s w Calculates the weighted median of a vector of samples s The output of the weighted median for nonneg ative integer weights w is given by MEDIAN s1 82 S8p301 W2 Wn MEDIAN s1 w1 82 9W3 8n Wn where represents the repetition operator i e repeat value s w times A generalization is too allow non integer weights and sign coupling is used in order to allow negative weights This process can be described as a multiplication between the sign of the weight sign w and the corresponding sample s The output of this function is then represented as MEDIAN s1 82 8n3W1 Wa Wn argmin wi sign w si i 1 6 1 4 Myriad filter matlab function myriadfilter s w tuningparam Computes the myriad of a set of N samples S s with weights W w The
27. elta is the shift as a column vector param is the parameterization must be 0 or 1 The spectral measure is defined by putting mass 1ambdal j 1 betalj 2 ats and mass lambdalj 1 betalj 2 at s Setting all beta equal to 1 gives the standard definition of a spectral measure with mass lambda 3 at s 3 Setting all beta equal to 0 guarantees that the distribution is symmetric putting weight 1ambdalj 2 at s If any element of beta is not 0 the distribution is assumed to be nonsymmet ric It is possible to manually make a spectral measure symmetric with nonzero beta by defining antipodal points and weights and values of beta that balance correctly However STABLE does not detect this Some parts of STABLE are significantly faster and more accurate in the symmetric case e g density calculations and simulations STABLE User Manual 20 4 1 5 Discrete spectral measure in 2 dimensions matlab function mvstablediscspecmeas2d alpha angle lambda beta delta param Define a bivariate stable distribution with discrete spectral measure This is a special case of the previous function In two dimensions the locations of the point masses can be specified by angles angle j gives the angle in radians of the location of s cos angle j sin angle j There are several special cases that are handled differently internally e When angle and lambda are of length 2 densities can be calculated in terms of univariate densities
28. ent parameterization The function returns two vectors containing the real and imaginary parts of w u a B k tan 3 signu a 1 sign u In u a 1 AS A 2 4 Series approximations to basic distribution functions These functions use the Bergstrom series for stable densities and cdfs which are only defined for a 1 2 4 1 Series approximation of stable pdf around the origin matlab function stablepdfseriesorigin x nterms theta param Computes the stable probability distribution function using a series approximation with nterms in it This function is best used to calculate the density near the origin in the 1 parameterization The series is not defined for a 1 Note that nterms 1 corresponds to a constant term nterms 2 corresponds to a linear term etc 2 4 2 Series approximation of stable cdf around the origin matlab function stablecdfseriesorigin x nterms theta param Computes the stable cumulative distribution function using a series expansion with nterms in it This function is best used to calculate the cdf near the origin in the 1 parameterization The series is not defined for a 1 Note that nterms 1 corresponds to a constant term nterms 2 corresponds to a linear term etc 2 4 3 Series approximation of stable pdf at the tail matlab function stablepdfseriestail x nterms theta param Computes the stable probability distribution function using a series approximation with nterms in it This function is best used to ca
29. ext section gives a description of the different functions in STABLE 2 Univariate Stable Functions Interfaced STABLE functions require input variables and return the results of the computations The interface computes the lengths of all arrays specifies default values for some of the variables in some case and handles return codes and results The parameters of the stable distribution must be specified In matlab the 4 stable parameters are passed in a vector thet a alpha beta gamma delta the index of stability alpha must be specified if fewer than four values are supplied the omited values are replaced with defaults 0 for skewness beta 1 for scale gamma and 0 for location delta The STABLE interface prints an error message when an error occurs If an error occurs execution is aborted if a warning occurs execution continues There is basic help information built into the interfaces In matlab type help before the command e g help stablepdf to get the function definition The STABLE library is not reentrant on a single computer only one user should be using the library at once The user should be aware that these routines attempt to calculate quantities related to stable distributions with high accuracy Nevertheless there are times when the accuracy is limited If is small the pdf and cdf have very abrupt changes and are hard to calculate When some quantity is small e g the cdf of the light tail of a totally skewed
30. g weights filterinfo Implement a sliding window operation over a 1 dimensional signal STABLESIGFILTER passes a win dow over the input data selecting successive windows On each window the filtering operation defined in filterinfo is performed The vectors data contains the observed data points s1 Sn and weights contains the weights The parameter padding defines how the end extremes of the input data are treated Several extension modes are possible and represent different ways of handling the problem of border distortion in the analysis In any case floor n 1 2 samples are appended to the signal at beginning and ceil n 1 2 at the end These modes are ZERO_PADDINC Adds zeros at the signal extremes STABLE User Manual 28 e CONSTANT_PADDING The first sample value and the last value are repeated at the beginning and at the end respectively e SYMMETRIC_PADDINC Symmetric replication at both ends padding is a reversed image of data at that endpoint e PERIOD_PADDING Periodic extension at both ends padding comes from other end of data e UNFILTERED_PADDING Leave unfiltered the first floor n 1 2 samples and the last ceil n 1 2 samples Thus the filter output for the unfiltered samples are the corresponding input samples The type of filtering done and it s associated parameters are specified in the structure filterinfo All filters require two fields Th
31. iled distributions Let p x log f x be the negative of the log density and define a cost function C O Sl Sm Cunweightea 0 Sl gt Sm 5 p s a 0 10 i 1 We define the stable filter to be the value of O that minimizes the cost 5 OsTaBLE Si k St ka lo gt gt Stthe s where z OsTABLE S1 5m arg min C 0 81 82 Sm 11 Since p x log f x the minimum of the cost function is exactly the maximum likelihood estimate of the location parameter 6 Note that in the Gaussian 2 case p x 1 2 and the minimum can be found explicitly it is simply OLiveEArR For 0 lt a lt 2 the filters are nonlinear with no closed formula and the minimum in 11 must be found numerically There are several generalizations of the filter that are given by modifying the cost function 10 The simplest extension is to allow non negative weights w Cyeishtea 0 S1 Sm gt plwils 0 12 M i l In detection problems one looks for a known pattern x1 n in the signal which is contaminated by stable noise St Oxi Nt t 1 2 3 The null case corresponds to 6 0 no signal the case where a signal is present corresponds to 9 4 0 There are two ways to implement this The first is to allow signed weights as in Arce 2005 This is an approximation to a matched filter using cost function m Csignea 9 81 Sm XC p lars sign 24 5 0 Y gt pleis
32. ion mvstableamplitudepdf r alpha gamma0 dim Compute the density f r where R is described above Current implementation works for a 0 8 2 There seems to be a relative error of approximately 3 for large r 4 4 3 Amplitude quantiles matlab function mvstableamplitudeinv p alpha gamma0 dim Compute the quantiles of the amplitude R described above Current implementation works for a 0 8 2 4 4 4 Simulate amplitude distribution matlab function mvstableamplitudernd nr alpha gamma0 dim Simulate n i i d values of the amplitude distribution R as described above Current implementation works for a 0 2 2 4 4 5 Fit amplitude data matlab function mvstablefitamplitude r dim method Estimate the parameters a and yo for amplitude data r contains the univariate amplitude data values d is the dimension of the underlying distribution that the amplitude data comes from met hod is the method to STABLE User Manual 23 use for estimating This initial implementation allows only met hod 5 which uses method of moments on the log of the amplitude data Other methods are planned for the future The function returns the estimated value of a and yo 4 4 6 Amplitude score function matlab function mvstableamplitudescore r alpha gamma0 d Compute the score function of the amplitude g r f r f r where f r fr rla yo d is the amplitude pdf defined above Current implementation works for a 0 8 2
33. lculate points on the tail of a distribution The series is defined only for x gt 0 For x lt 0 replace x by x and 8 by 8 The series is not defined for a 1 2 4 4 Series approximation of stable cdf at the tail matlab function stablecdfseriestail x nterms theta param Computes the stable cumulative distribution function using a series approximation with nterms in it This function is best used to calculate points on the tail of a distribution The series is defined only for x gt 0 For x lt 0 replace x by x and 8 by 8 The series is not defined for a 1 STABLE User Manual 14 2 5 Faster approximations to basic functions The functions described in preceding sections are accurate but can take a long time to compute For evalu ating a single pdf or cdf at a single set of parameter values they are fine However when the functions must be evaluated many times the previous routines are slow For example when estimating stable parameters by maximum likelihood estimation the likelihood is evaluated at each data point for a large number of parameter values during the numerical search for the point where the likelihood is maximized In these cases speed is more desirable than great accuracy The functions described below are approximations to the functions above and are based on pre computed values using those basic functions They are designed to evaluate the quantity of interest at many x values for fixed values of
34. ll parameters needed by the filter requested rhofn Rho function to use in cost function calculations It can be RHO_STABLELOGLIK slow est RHO_STABLEQKLOGLIK medium speed or RHO_STABLEQKLOGPDFGRID_LINEAR fastest cost n Form of the cost function It can be COST_UNWEIGHTED COST NONNEG_WEIGHTED COST_ SIGNED WEIGHTED or COST_MATCHED These corresponds to equations 10 12 13 and 14 respectively searchmethod Search minimization method to use It can be FIXEDPOINTSEARCH_I FIXED POINTSEARCH IT BRANCHANDBOUND LIP or BRANCHANDBOUND_LOC_BND queuesize Length of queue in Branch and Bound search iternum Number of iterations param Parameterization of stable distribution If beta is not zero param must be 2 Recall that the 2 parameterization is centered at the mode of the stable density alpha Alpha in the stable distribution beta Beta in the stable distribution gamma Gamma in the stable distribution xtol Tolerance as stopping criteria of searchmethod lipconst Lipschitz constant for Branch and Bound Lipschitz init Theta initialization criteria It can be USER DEFINED or FIXED stop Stopping criteria in the adaptive filter It can be VARY or FIXED x0 initial point for search 6 Signal Filtering Functions 6 1 6 1 1 Filter functions Stable Signal filtering matlab function stablesigfilter data paddin
35. ll focus on two here which we call the 0 parameterization and the 1 parameterization The STABLE programs use a variable param to specify which of these parameterizations to use If you are only concerned with symmetric stable distributions the two parameterizations are identical For non symmetric stable distributions we recommend using the 0 parameterization for most statistical problems and only using the 1 parameterization in special cases e g the one sided distributions when a lt 1 and 8 1 Since there are no formulas for the density and distribution function of a general stable law they are described in terms of their characteristic function Fourier transform A random variable X is S a 8 y 9 0 if it has characteristic function exp y u 1 ib tan 2 sign u yu 29 1 idu a Al E X 2 1 PES te y u 1 722 sign u In y u i u a l1 1 A random variable X is S a 3 7 1 if it has characteristic function t _ fexp y ul 1 ib tan 52 signu idu afl ES oe y u 1 782 sign u In u i u a 1 2 Note that if 6 0 then these two parameterizations are identical it is only when 8 0 that the asymmetry term the imaginary factor involving tan or 2 becomes relevant More information on parameterizations and about stable distributions in general can be found at http academic2 american edu Jpnolan which has a draft of the first chapter of Nolan 2010 The n
36. lt u gt j s where w ula 8 k is defined in 3 As in one dimension the 1 parameterization is more common in theo retical research while the 0 parameterization is better suited to computation and statistical problems Here and below lt u X gt uX u Xi ugXq is the inner product Symmetric stable distribu tions are defined by the condition xie X which is equivalent to A being a symmetric measure on S i e A A A A for any Borel subset A C S As in the univariate case in the symmetric case the O parameterization and the 1 parameterization coincide The general case is beyond current computational capabilities but several special cases isotropic radially symmetric elliptical independent components and discrete spectral measure are computationally accessible isotropic The spectral measure is continuous and uniform leading to isotropic radial symmetry for the dis tribution The characteristic function is Eexp i lt u X gt exp 9g Jul i lt u gt 4 elliptical The characteristic function is E exp i lt u X gt exp ryan i lt u d gt 5 where R is a positive definite matrix R 7 J is equivalent to the isotropic case above independent components If components are independent with X S a Bj Yj 05 k then the charac teristic function is d Eexp i lt u X gt exp X o ujla Bj k i lt u gt 6 j 1 This is a special case of the discrete spectral
37. lue to specify the significance level default p value 0 05 gives 95 confidence intervals and show plots is a Boolean used to determine if plots of the profile likeli hoods are shown for each parameter 2 3 Informational utility functions 2 3 1 Version information matlab function stableversion This functions returns information of the version of STABLE that is being used The values are vinfo major version number minor version number modification number year of release month of release 1 vinfo 2 vinfo 3 4 5 vinfo vinfo STABLE User Manual 12 vinfo 6 day of release vinfo 7 internal serial number For example the values 4 0 2 2005 9 15 123 mean that you are using version 4 0 2 of STABLE which was released on 2005 9 15 with serial number 123 nv is the length of the integer array vinfo If nv is more than 7 other information may be filled into the vinfo array 2 3 2 Modes of stable distributions matlab function stablemode theta param Returns the mode of a S theta 1 theta 2 y theta 3 6 theta 4 param distribution If 6 4 0 the mode is determined by a numerical search of the pdf 2 3 3 Set internal tolerance matlab function stablesettolerance inum value Sets the value of an internal variable that is used during computations You change these values at your own risk computation times can become very long and some choices of the parameters can cause infinite loops in
38. ly data point e If searchmethod FIXEDPOINTSEARCH IP then set iternum This method uses a fixed point algorithm with multiple initialization points Precisely the fixed point search is run starting at each sample value e If searchmethod BRANCHANDBOUND LIP then set xtol queuesize lipconst This method uses a branch and bound minimization routine based on Lipschitz bound for the function p x e If searchmethod BRANCHANDBOUND_LOC_BND then set xtol x0 and queuesize This method uses a branch and bound minimization routine based on a local bound 6 2 Cost functions 6 2 1 Cost function vectorized matlab function stablecostfn x s w rhofn costfn theta param Computes the general cost function for a vector of x values s and w are as in the cost function for mula costfn determines which one of equations 10 12 13 and 14 is used and param is the parameterization rho n determines how p x is evaluated theta a 8 y 9 are the stable parameters 6 2 2 Cost function at a single point matlab function not implemented in matlab Computes the general cost function at a single x value Used internally STABLE User Manual 30 7 Error return codes An error is unrecoverable and stops execution For example if you ask to compute the density of a stable parameter with a 3 you will get a return code of 1 and your function will stop In contrast a warning is informational and is usually not serious It aler
39. measure below the spectral mass is concentrated on the points where the coordinates axes intersect the unit sphere discrete When the spectral measure is discrete with mass A ats S j 1 m the characteristic function is Eexp i lt u X gt exp Y w lt u s gt a 1 k Aj i lt u gt 7 j l This discrete class is dense in the class of all stable distributions any finite spectral measure A can be approximated by a discrete measure see Byczkowski et al 1993 Below is a plot of the density surface of a bivariate stable density with three point masses each of weight 1 at locations cos 7 3 sin 7 3 1 0 and cos 57 3 sin 57 3 STABLE User Manual 18 density surface contours of density surface triangle alpha 1 3 XX 0 4 Multivariate Stable Functions Since the specification of a multivariate stable distribution is somewhat cumbersome a different approach from the univariate case is taken in these routines Two steps are needed to work with a multivariate stable distribution First the distribution is specified by calling a function to define the distribution Second call a separate functions to compute densities cumulatives simulate etc The programs for working with multivariate stable distributions are less well developed and generally limited to 2 dimensions At the current time when dimension is greater than 2 you can a simulate using mvstablernd b calculate the pdf using mvstablepdf
40. myriad filter is a stable filter for the Cauchy case a 1 8 0 y tuningparam param 0 See Arce 2005 for more information STABLE User Manual 29 6 1 5 Selection filter matlab function selectionfilter s w filterinfo Computes the so called selection M filter The selection filter outputs the input sample with the low est cost function The following parameters of the structure filterinfo are expected alpha beta gamma param rhofn and cost fn If cost fn is not COST UNWEIGHTED then the weights must be specified 6 1 6 Stable filter matlab function stablefilter s w filterinfo Computes the stable filter of a set of nwin samples s with weights w If mode is BASIC the following parameters of the structure filterinfo are expected cost fn alpha beta gamma and param If costfn is not COST_UNWEIGHTED then the weights must be specified searchmethod is set to BRANCHANDBOUND_LOC_BND and other values are set to default values If mode is ADVANCED the following parameters of the structure filterinfo are expected cost fn rhofn alpha beta gamma param and searchmethod If cost fn is not COST UNWEIGHTED then the weights must be specified Depending on the value of searchmethod the following fields are required in filterinfo e If searchmethod FIXEDPOINTSEARCH T then set iternum This method uses a fixed point search routine initialized at the output of the selection filter the most like
41. n matlab function stablenonlinfn x theta param This function computes the score or nonlinear function for a stable distribution g x f x f x d dx ln f x The routine uses stablepdf to evaluate f x and numerically evaluates the derivative f x Warning this routine will give unpredictable results when 1 The problems occur where f a 0 is small in this region calculations of both f x and f x are of limited accuracy and their ratio can be very unreliable 2 2 Statistical functions 2 2 1 Estimating stable parameters matlab function stablefit x method param Estimate stable parameters from the data in z1 n using method as described in the following table This routine calls one of the functions described below to do the actual estimation method value algorithm notes 1 maximum likelihood a gt 0 4 2 quantile a gt 0 1 3 empirical characteristic function a gt 0 1 4 fractional moment a gt 0 4 8 0 uses power p 0 2 5 log absolute moment B 6 0 6 modified quantile a gt 0 4 7 U statistic method B d Note that the fractional moment and log absolute moment methods do not work when there are zeros in the data set 2 2 2 Maximum likelihood estimation matlab function stablefitmle x param Estimate the stable parameters for the data in x1 T in parameterization param using maximum likelihood estimation The likelihood is numerically evaluated and maximize
42. onsymmetric case Both routines are accurate near the center of the distribution and have limited accuracy near the tails 4 2 2 Cumulative function matlab function mvstablecdf dist a b This function approximates P a lt X lt b If the components are independent it computes this by taking the product of the corresponding univariate probabilities In the symmetric two dimensional case the probability is evaluated by numerically integrating the nu merically computed 2 dimensional density f x Due to the limited precision in the numerical calculation of the density and the approximate nature of the integration of this density this routine gives only a few digits of accuracy To find the probability of an unbounded regions it is best to truncate the region using the routine in Section 4 2 5 to find a bounded rectangle containing most of the probability Use the function in Section 4 2 3 to approximate in 2 dimensional nonsymmetric case or in higher di mensions STABLE User Manual 21 4 2 3 Cumulative function Monte Carlo matlab function mvstablecdfMC dist a b n This function approximates P a lt X lt b by simulating n indepedent random vectors with the same distribution as X and counting how many are in the interval a b It works for any distribution and dimension that can be simulated 4 2 4 Multivariate simulation matlab function mvstablernd dist n Simulate n stable random vectors from the stable distrib
43. or theta is used the value of y theta 3 is ignored The following function is used to compute y then the previous function is called to generate the values 2 6 7 Find scale y to have a specified saturation probability for a discrete stable distribution matlab function stablediscretefindgamma theta cutoff psaturation param Given a 6 and cutoff a b the scale y is computed to get the requested saturation probability e g psaturation P X lt a 1 2 P X gt 6 4 1 2 2 6 8 Discrete maximum likelihood estimation matlab function stablefitdmle x cutof method param Estimate the stable parameters for the discrete stable data in 7 2 in parameterization param using maximum likelihood estimation The likelihood is numerically evaluated and maximized using an optimization routine When method 1 stablepdfdiscrete is used to calculate likelihood when method 2 symmetry is assumed 8 0 and a faster method is used to compute the likelihood STABLE User Manual 17 3 Multivariate Stable Introduction To specify a multivariate stable distribution X X1 X2 Xq in d dimensions requires an index of stability a 0 2 a finite Borel measure A on the unit sphere S s R s 1 and a shift vector R The measure A is called the spectral measure of the distribution The joint characteristic function of X S a A 6 k is given by Eexp i lt u X gt exp a u s gt a 1 k A ds i
44. parameters 1101 error Too many input parameters 1110 error Undefined padding 1111 error Undefined filter 1112 error Undefined rho function 1113 error Undefined minimization method 1114 error Full queue 1116 error Skewed data needs parameterization 2 1117 error Undefined cost function 1118 error Negative weight 1119 error Buffer too small 1120 error Dimension error 1121 error Undefined initialization method 1130 error Invalid input argument 1140 error Method parameter undefined 1150 error Insufficient memory 1160 error Memory violation 1170 error Error in subroutine 1180 error SAR model not defined 1999 error Other kind of error Table 3 Signal filtering error codes 31 STABLE User Manual 32 References Abdul Hamid H and J P Nolan 1998 Multivariate stable densities as functions of one dimensional projections J Multivar Anal 67 80 89 Arce G R 2005 Nonlinear Signal Processing Wiley NY Astola J and P Kuosmanen 1997 Fundamentals of Nonlinear Digital Filtering ARC Press Byczkowski T J P Nolan and B Rajput 1993 Approximation of multidimensional stable densities J Multivar Anal 46 13 31 Chambers J C Mallows and B Stuck 1976 A method for simulating stable random variables Journal of the American Statistical Association 71 354 340 344 Fan Z 2006 Parameter estimation of stable
45. ptical x method1d x contains the data values met hod1d is the method to use for estimating univariate stable parameters internally see Section 2 2 1 for codes The function returns a list structure that contains information about the fit The fields in the fit are the estimated value of a the estimated shift location vector 6 and R for the estimated shape matrix 4 4 Amplitude distribution For d dimensional random vector X the univariate quantity R X is called the amplitude of X When X is isotropic the radial symmetry allows one to reduce the dimension of the problem to a univariate problem The following routines compute the cdf pdf quantiles simulate and estimate for amplitudes of isotropic stable random vectors Since these are univariate quantities and it is required that the distribution is isotropic one does NOT have to define the isotropic distribution separately Because of computational delicacy these routines are limited to dimension d lt 100 4 4 1 Amplitude cumulative distribution function matlab function mvstableamplitudecadf r alpha gamma0 dim Compute the cdf of the amplitude distribution Fr r P R lt r for R X where X is an d di mensional isotropic stable random vector with characteristic function E exp i lt u X gt exp 7 u Current implementation works for a 0 8 2 There seems to be a relative error of approximately 3 for large r 4 4 2 Amplitude density matlab funct
46. st is converted to the new parameterization and a new distri bution descriptor is returned STABLE User Manual 25 5 Signal Filtering Introduction The standard additive noise model for a signal is St Lt F Nt t 1 2 3 8 Here the x are some signal we are interested in and the n are noise terms that corrupt the signal This noise can be caused by natural events like lightening sea clutter in naval radar systems animal sounds snapping shrimp underwater or man made sources like electro mechanical noise in urban environments The goal is to recover the unknown signal x as well as possible This is done by computing an estimate 5 using a sliding window of the data centered at t e The traditional linear filter uses a window of width m to compute an estimate for each window 5 OLINEAR St k gt St ky 41 St ko where ky m 2 ka m k and OLINBAR S1 8m s S2 Sm mM 9 The well established theory of linear filter shows this is optimal when a 2 but experience shows that the linear filter can be severely degraded when a lt 2 As is well known in the statistics literature extreme values of the noise terms n can have a large effect on the sample mean This is illustrated in Figure 1 Models built on a stable distribution yield a non linear filtering technique that is optimal for the case when the noise terms are stable These filters are also robust working well with other heavy ta
47. stable distribution the routines may only be accurate to approximately ten decimal places The remainder of this section is a description of the functions in the STABLE library 2 1 Basic functions 2 1 1 Stable densities matlab function stablepdf x theta param STABLE User Manual 6 This function computes stable density functions pdf y f x f xila G 7 6 param i 1 n The algorithm is described in Nolan 1997 2 1 2 Stable distribution functions matlab function stablecdf x theta param This function computes stable cumulative distribution functions cdf y F x F x la 6 y 6 param i 1 n The algorithm is described in Nolan 1997 2 1 3 Stable quantiles matlab function stableinv p theta param This function computes stable quantiles the inverse of the cdf x F p i 1 n The quantiles are found by numerically inverting the cdf Note that extreme upper tail quantiles may be hard to find because of subtractive cancelation in double precision arithmetic 1 p and 1 are indistinguishable for small p less than approximately10 1 STABLE will correctly return F 1 p F 1 1 00 for most values of a and 3 You can get better accuracy on the lower tails where there is no subtractive cancelation use the reflection property F x a 3 1 F 2la 8 Also note that the accuracy of the inversion is determined by two internal tolerances See Section 2 3 3
48. t work when there are zeros in the data set because log x is undefined when z is 0 Remove zero values and possibly values close to 0 from the data set if you want to use this method 2 2 9 Quantile based estimation version 2 matlab function no direct interface use stablefit with method 6 Estimate stable parameters for the data in x using a modified quantile method of Nolan 2010 It should work for any values of the parameters but some extreme values are inaccurate STABLE User Manual 9 2 2 10 U statistic based estimation matlab function no direct interface use stablefit with method 7 Estimate stable parameters for the data in x using the method of Fan 2006 It only works for the symmetric case 2 2 11 Confidence intervals for ML estimation matlab function stablefitmleci theta n z This routine finds confidence intervals for maximum likelihood estimators of all four stable parame ters The routine returns a vector sigtheta of half widths of the confidence interval for each param eter These values depend on the confidence level you are seeking specified by z and the size of the sample n The z value is the standard critical value from a normal distribution i e use z 1 96 for a 95 confidence interval For example the point estimate of a is theta 1 and the confidence inter val is theta 1 sigtheta 1 For the confidence interval is theta 2 sigtheta 2 for y the confidence interval is theta 3 sigtheta 3
49. tion returns a vector p of length n with pi P Y xi P Y t Yo o4 Note that eps is the attempted accuracy for each probability p not for the total error The probabilities are computed using the bivariate cdf function above and thus only works for symmetric stable two dimen sional distributions It s accuracy is limited it is likely that when all possible values of x are used gt gt p will be slightly different from 1 The current implementation is slow The met hod variable is unused at the current time it will be used for faster approximations in future implementations 4 7 Multivariate informational utility functions 4 7 1 Information about a distribution matlab function mvstableinfodist Returns information about distribution dist Useful for checking that definition 4 7 2 Compute projection parameter functions matlab function mvstableparfn2d dist angle Compute the exact parameter functions for a bivariate stable distribution For direction t R X t is univariate stable with parameters a 3 t y t 6 t This function computes the parameter functions and 6 at the values t cos angle j sin angle j Angles in angle are given in radians 4 7 3 Multivariate convert parameterization matlab function mvstableconvert dist newparam Converts between multivariate stable parameterizations newparam must be 0 or 1 In the interfaced versions of STABLE the input distribution di
50. tribution with a and restricted to the range abnd 1 lt a lt abnd 2 and bbnd 1 lt 6 lt bbnd 2 and L is the maximum likelihood of the data under an unrestricted stable model The function computes the maximum likelihood using the quick approximation to stable likelihoods so is limited to a in the range 0 4 2 The vector results will contain the results of the computations results results results results estimated value of alpha without assuming HO estimated value of beta without assuming HO estimated value of gamma without assuming HO estimated value of delta without assuming HO results 1 ratio of the likelihoods results 2 2 log ratio of likelihoods results 3 log likelihood of the data for the restricted HO results 4 log likelihood of the data for the unrestricted H1 results 5 estimated value of alpha under HO results 6 estimated value of beta under HO results 7 estimated value of gamma under HO results 8 estimated value of delta under HO 9 1 1 1 0 1 2 Note that under the standard assumptions results 2 converges to a chi squared distribution with d f free parameters in H1 parameter space free parameters in HO parameter space as the sample size tends to oo For example to compute the likelihood ratio test for the null hypothesis HO data comes from a normal distribution vs H1 data comes from stable distribution use abnd 2 2 and bbnd 0 0 in
51. trovelis Kogon Williams described in Kogon and Williams 1998 An initial estimate of the scale gamma0 and the location delta0 are needed to get accurate results We recommend using the quantile based estimates of these parameters as input to this routine 2 2 7 Fractional moment estimation matlab function no direct interface use stablefit with method 4 Estimate stable parameters for the data in x using the fractional moment estimator as in Nikias and Shao 1995 This routine only works in the symmetric case it will always return 6 0 and 0 In this case the 0 parameterization coincides with the 1 parameterization so there is no need to specify parameterization p is the fractional moment power used A reasonable default value is p 0 2 take p lt a 2 to get reasonable results This method does not work if there are zeros in the data set negative sample moments do not exist Remove zero values and possibly values close to 0 from the data set if you want to use this method 2 2 8 Log absolute moment estimation matlab function no direct interface use stablefit with method 5 Estimate stable parameters for the data in x using the log absolute moment method as in Nikias and Shao 1995 This routine only works in the symmetric case it will always return 6 0 and 0 In this case the 0 parameterization coincides with the 1 parameterization so there is no need to specify parameterization The log absolute moment method does no
52. ts you to the fact that the results of a calculation may have some inaccuracy For example stable densities have radical changes of the tail behavior when a 2 or 1 and the computations have small inaccuracies in them In practical terms this usually means little as the difference between an a 1 99 stable distribution and an a 2 stable distribution in an statistical problem is likely to be unobservable in practice In matlab you can turn error and warning messages off with warning off all The warning mes sages can be enable again with the command warning on all See the section on the warning com mand in matlab help for more information Return codes for STABLE program are given in the tables below Univariate routines return error codes in the range 1 99 multivariate routines return error codes in the range 100 199 code type meaning 0 No error 1 error Invalid input parameter 2 error alpha parameter outside of tabulated values in QKSTABLE 3 error Too many data points for internal array 4 error Error computing the likelihood e g pdf 0 5 warning Possible approx error while using QKSTABLE for alpha or beta near boundary 6 warning Possible error in confidence intervals because parameter is near boundary 7 warning alpha and or beta rounded to a special value adjust tol 4 8 warning alpha is at lower bound for search may not have found best value for alpha 9 error Too many bins distinct possible
53. um meaning 1 enable internal warning messages Warning this will not work when used from R Mathematica or matlab relative error for pdf numerical integration relative error for cdf numerical integration relative error for quantile search alpha and beta rounding x tolerance near zeta exponential cutoff peak strim location tolerance stabletrim tolerance minimum alpha minimum xtol threshold for quantile search x tolerance O0OV0D0 DARRO Re o 2 3 4 Get internal tolerance matlab function stablegettolerance inum Returns the value of the internal settings see the preceding function for the meanings of each variable 2 3 5 Convert between parameterizations matlab function stableconvert iparam thetai jparam Convert from the parameters given in theta given in the param parameterization to the parameters thetanew given in the newparam parameterization Currently param and newparam are restricted to the values 0 1 2 and 3 STABLE User Manual 13 2 3 6 Omega function matlab function stableomega u theta param Compute the function w u a 8 k i 1 n where jule 1 ib tan 2 siena Ju 2 1 afl PEPO E u 1 492 sign u In ul a 6 alii vapi Ll ae These functions are from the characteristic functions of standardized univariate stable distributions if Z S a 6 1 0 k then E exp iuZ exp w ula 8 k As before k 0 or k 1 correspond to two differ
54. ution dist This works for any distribution that can be defined in dimensions d gt 2 4 2 5 Find a rectangle with probability at least p matlab function mvstablefindrectangle dist p Find a number r so that the rectangle A A r r r x r r has P X A gt p where X isa bivariate stable distribution defined by dist This is used for technical calculations e g in approximating the probability of unbounded regions The method uses univariate projections and will generally give an overestimate of r The method is less accurate for small p or if the distribution is not centered or highly skewed it gets more accurate if p is close to 1 and the distribution is centered and symmetric If p is not too close to 1 one can get a better value of r by making repeated calls to the multivariate cdf function with rectangles of the form A r and search for a value of r that makes P X A r close to p That procedure involves bivariate numerical integration will take much longer than this function 4 3 Statistical functions 4 3 1 Estimate a discrete spectral measure fit a stable distribution to bivariate data matlab function mvstablefit x nspectral method1d method2d param x contains the data values nspect ral is the number of points in the estimated spectral measure must be divisible by 4 met hod1d is the method to use for estimating univariate stable parameters internally see Section 2 2 1 for codes only used if method2d 1
55. v goodness of fit test 2 2 o e 9 2 2 16 Likelihood ratio test cs ed A o A Re BS 10 2217 Stable regression s ri AS GO Bee de de fe a e 10 2 2 18 Stable regression profile likelihood parameter confidence intervals 11 Informational utility functions 2 2 2 20 0 ee ee ee 11 2 3 1 Version information 2 000000 a 11 2 3 2 Modes of stable distributions o a oa e 12 2 3 3 Setintemal tolerance cose ee e E a ee Be ee 12 2 3 4 Get mtermal tolerance cos sai poa ri a ee a RE a y ee ae 12 2 3 5 Convert between parameterizations e 12 23 0 Omega f ncton si a De eet te Re ah tt ee AA as A 13 Series approximations to basic distribution functions 0 13 2 4 1 Series approximation of stable pdf around the origin 13 2 4 2 Series approximation of stable cdf around the origin 13 2 4 3 Series approximation of stable pdf at the tail 13 2 4 4 Series approximation of stable cdf at the tail 13 Faster approximations to basic functions o o o 14 2 5 1 Quick stable density computation o e e 14 2 5 2 Quick stable cumulative computation o e 14 2 5 3 Quick stable log pdf computation e 14 2 5 4 Quick stable quantile computation o a 14 2 5 5 Quick stable hazard function computation o
56. which case results 2 will have 2 df To test HO data comes from a symmetric stable distribution vs H1 data comes from a general stable distribution use abnd 0 4 2 and bbnd 0 0 in which case results 2 will have 3 d f 2 2 17 Stable regression matlab function stableregression x y trimprob symmetric Computes regression coefficients b1 b2 by for the problem Yi bizia boti Hee bktik tein 1 1 n STABLE User Manual 11 where the error term e has a stable distribution In matrix form the equation is y Xb e The algorithm is described in Nolan and Ojeda 2006 y is a vector of length n of observed responses x is an x k matrix with the columns of x representing the variables and the rows representing the different observations NOTE if you want an intercept term you must include a column of ones in the x matrix Typically one sets the first column of x to ones and then b is the intercept trimprob is a vector of length 2 e g 0 1 0 9 which gives the lower and upper quantiles for the trimmed regression Trimmed regression trims off extreme values and then performs ordinary least squares regression The resulting coefficients are used to get an initial estimate of the stable regression coefficients symmetric can be used to force the fitting program to assume symmetry in the error terms ej The interfaced versions of this function returns a structure with different fields e bis the vector of coeffi
57. x 10 13 i l i l The second way is a true stable matched filter with cost function Cmatched 0 S1 Sm X p s 62 14 i l STABLE User Manual 26 x t linear filter o N S e A o 4 o O 4 LO 1 o a y T T T T T T o 4000 8000 o 4 stable filter el N o F 2 y gt NAA AAA o 4 o a _I gt o l Qu a T T T T T T T T T T T o 2000 4000 6000 8000 10000 o 4000 8000 Figure 1 Signal filtering with symmetric stable noise a 1 3 y 2 n 10000 samples and window width m 50 The large graph shows a sinusoidal signal with simulated noise the smaller plots show the output of a linear filter and a unweighted stable filter Note the difference in the scales for the input and the output The obtained by minimizing 14 gives an estimate of the strength of the original pattern in the signal The STABLE Signal Filtering module implements these filters making it possible to optimally deal with heavy tailed noise The implementation of these filters involves numerous computational difficulties The difficulty of computing the relevant cost function is resolved by the functions in the STABLE univariate module A second problem is nonconvexity if a 4 2 the p x function above is not convex so the cost function is not convex In particular there can be multiple local minima of the cost function and a reliable filter should find th
Download Pdf Manuals
Related Search
Related Contents
取扱説明書 キーボード・エキスパンダー PIH-800EK 時刻合せがいわない 取扱説明書 添付文書 Samsung VP-MM11S 用户手册 Lenovo VIBE X2 32GB 4G Gold Sitecom USB 2.0 Hub 7 port seca 954 - Scale Manuals Samsung WD80J5430AW/EC Manual de Usuario Manuel d`installation Copyright © All rights reserved.
Failed to retrieve file