/ Home
S-Archive Download Script
mmfreq MM Frequency Estimation
DESCRIPTION
Estimates a sum of sinusoidal signals using M estimators for the scale and the signal. The M estimators are chosen for 95% efficiency under normal errors.
 
USAGE
mmfreq(y,x=NULL,freq,coef=NULL,constant=F,scale=NULL,trace=F)
 
REQUIRED ARGUMENTS
y numeric vector of observations.
freq numeric vector of starting values for the frequencies.
 
OPTIONAL ARGUMENTS
x numeric vector of time points. Defaults to 0:(length(y)-1)
coef numeric vector of starting values for the coefficients. By default these are estimated using the built-in S-Plus function ltsreg.
constant logical constant. If true, include a constant or intercept in the model.
scale numeric constant giving scale of the residuals. By default this is estimated using mscale for the starting parameter values.
trace logical constant. If true, frequencies and criterion are printed at each iteration.
 
VALUE
freq numeric vector of estimated frequencies.
coef numeric vector of estimated coefficients.
fitted numeric vector of same length as y of fitted values.
residuals numeric vector of same length as y of residuals.
scale numeric constant giving the estimated or input scale.
criterion numeric constant giving the estimated criterion functoin.
 
DETAILS
Uses Hampel's redescending psi function. The estimators simultaneously have high breakdown and 95% efficiency under normal errors if consistent high breakdown starting values can be found.

If constant = T then the assumed model is

y = a[1] + a[2]*cos(x*f[1]) + ... + a[p+1]*cos(x*f[p]) + a[p+2]*sin(x*f[1]) + ... + a[2*p+1]*sin(x*f[p])

where coef = a, freq = f and p = length(f). If constant = F then the model is

y = a[1]*cos(x*f[1]) + ... + a[p]*cos(x*f[p]) + a[p+1]*sin(x*f[1]) + ... + a[2*p]*sin(x*f[p])

The values for f define the freq vector while the values for a define the coef vector.

 
REFERENCES
Yohai, V. J. (1987). High breakdown point and high efficiency robust estimates for regression. Ann. Statist. 15, 642-656.

Stromberg, A. J. (1993). Computation of high breakdown nonlinear regression parameters. J. Amer. Statist. Assoc. 88, 237-244.

Smyth, G. K., and Hawkins, D. M. (2000). Robust frequency estimation using elemental sets. Journal of Computational and Graphical Statistics 9, 196-214. (Abstract - Zipped PostScript)
 
SEE ALSO
mmnl, mscale, rho.hampel, psi.hampel, robfreq
 
EXAMPLES
The function robfreq uses mmfreq.

 

S-Archive Download Script

Gordon Smyth. Copyright © 1996-2016. Last modified: 10 February 2004