Robust fit of a Beta distribution using CvM distance minimization
Robust fit of a Beta distribution using CvM distance minimization
Robustly fits a Beta distribution to data using -von-Mises (CvM) distance minimization.
latin1
betaCvMfit(data, CvM =TRUE, rob =TRUE)
Arguments
data: numeric vector: The sample, a Beta distribution is fitted to.
CvM: logical: If FALSE the -von-Mises-distance is not minimized, but only moment estimates for the parameters of the Beta distribution are returned (see Details).
rob: logical: If TRUE, mean and standard deviation are replaced by median and MAD when calculating moment estimates for the parameters of the Beta distribution (see Details).
Details
betaCvMfit fits a Beta distribution to data by minimizing the -von-Mises distance. Moment estimates of the parameters of the Beta distribution, clipped to positive values, are used as starting values for the optimization process. They are calculated using
where u[(1)],…,u[(n)] is the ordered sample and F the distribution function of Beta(a,b).
Returns
numeric vector: Estimates for the Parameters a,b of a Beta(a,b) distribution with mean a/(a+b).
Author(s)
Anita M. Thieler, with contributions from Brenton R. Clarke.
Note
Adapted from R-Code from Brenton R. Clarke to fit a Gamma distribution (see Clarke, McKinnon and Riley 2012) using -von-Mises distance minimization. Used in Thieler et al. (2013). See also Thieler, Fried and Rathjens (2016).
See Also
See RobPer-package for an example applying betaCvMfit to detect valid periods in a periodogram.
References
Clarke, B. R., McKinnon, P. L. and Riley, G. (2012): A Fast Robust Method for Fitting Gamma Distributions. Statistical Papers, 53 (4), 1001-1014
Thieler, A. M., Backes, M., Fried, R. and Rhode, W. (2013): Periodicity Detection in Irregularly Sampled Light Curves by Robust Regression and Outlier Detection. Statistical Analysis and Data Mining, 6 (1), 73-89
Thieler, A. M., Fried, R. and Rathjens, J. (2016): RobPer: An R Package to Calculate Periodograms for Light Curves Based on Robust Regression. Journal of Statistical Software, 69 (9), 1-36, doi:10.18637/jss.v069.i09