MMreg_control: Creates an 'MMreg_control' object

View source: R/Sreg_control.R

MMreg_controlR Documentation

Creates an MMreg_control object

Description

Creates an object of class MMreg_control to be used with the fsreg() function, containing various control parameters for calling the MATLAB function MMreg().

Usage

MMreg_control(intercept = TRUE, InitialEst, eff, effshape, 
    rhofunc = c("bisquare", "optimal", "hyperbolic", "hampel"), rhofuncparam, 
    refsteps = 3, tol = 1e-07, conflev, 
    nocheck = FALSE, Smsg = TRUE, plot = FALSE)

Arguments

intercept

Indicator for constant term. Scalar. If intercept=TRUE, a model with constant term will be fitted (default), else, no constant term will be included.

InitialEst

Starting values of the MM-estimator, a list with the fiollowing elements: loc, a $p x 1$ vector, location vector estimate and scale, a scaler, estimate of the scale. If empty (default) the program will use S estimators. In this last case it is possible to specify the options given in function Sreg.

eff

Scalar defining nominal efficiency (i.e. a number between 0.5 and 0.99). The default value is 0.95.

effshape

Location or scale efficiency. If effshape=1 efficiency refers to shape efficiency else (default) efficiency refers to location efficiency.

rhofunc

Specifies the rho function which must be used to weight the residuals. Possible values are 'bisquare' 'optimal' 'hyperbolic' 'hampel'.

  1. 'bisquare' uses Tukey's rho and psi functions. See TBrho and TBpsi.

  2. 'optimal' uses optimal rho and psi functions. See OPTrho and OPTpsi.

  3. 'hyperbolic' uses hyperbolic rho and psi functions. See HYPrho and HYPpsi.

  4. 'hampel' uses Hampel rho and psi functions. See HArho and HApsi.

The default is 'bisquare'.

rhofuncparam

Additional parameters for the specified rho function. For hyperbolic rho function it is possible to set up the value of k = sup CVC (the default value of k is 4.5).

For Hampel rho function it is possible to define parameters a, b and c (the default values are a=2, b=4, c=8)

refsteps

Number of refining iterations in each subsample (default is refsteps=3). refsteps = 0 means "raw-subsampling" without iterations.

tol

Scalar controlling tolerance in the MM loop. The default value is tol=1e-6

conflev

Confidence level which is used to declare units as outliers. Usually conflev=0.95, 0.975, 0.99 (individual alpha) or conflev=1-0.05/n, 1-0.025/n, 1-0.01/n (simultaneous alpha). Default value is 0.975

nocheck

Check input arguments, scalar. If nocheck=TRUE no check is performed on matrix y and matrix X. Notice that y and X are left unchanged. In other words the additional column of ones for the intercept is not added. As default nocheck=FALSE.

Smsg

Controls whether to display or not messages on the screen If Smsg==TRUE (default) messages are displayed on the screen about step in which signal took place else no message is displayed on the screen.

plot

Plot on the screen. Scalar. If plots=TRUE the plot of minimum deletion residual with envelopes based on n observations and the scatterplot matrix with the outliers highlighted is produced. If plots=2 the user can also monitor the intermediate plots based on envelope superimposition. If plots=FALSE (default) no plot is produced.

Details

Creates an object of class MMreg_control to be used with the fsreg() function, containing various control parameters.

Value

An object of class "MMreg_control" which is basically a list with components the input arguments of the function mapped accordingly to the corresponding Matlab function.

Author(s)

FSDA team

See Also

See Also as FSR_control, MMreg_control and LXS_control

Examples


## Not run:   
data(hbk, package="robustbase")
(out <- fsreg(Y~., data=hbk, method="MM", control=MMreg_control(eff=0.99, rhofunc="optimal")))

## End(Not run)

fsdaR documentation built on March 31, 2023, 8:18 p.m.