fsdaR (version 0.4-9)

Sreg_control: Creates an Sreg_control object

Description

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

Usage

Sreg_control(intercept = TRUE, bdp = 0.5, 
    rhofunc = c("bisquare", "optimal", "hyperbolic", "hampel"), rhofuncparam, 
    nsamp = 1000, refsteps = 3, reftol = 1e-06, refstepsbestr = 50, reftolbestr = 1e-08, 
    minsctol = 1e-07, bestr = 5, 
    conflev, msg = TRUE, nocheck = FALSE, 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.

bdp

Breakdown point. It measures the fraction of outliers the algorithm should resist. In this case any value greater than 0 but smaller or equal than 0.5 will do fine.

Note that given bdp nominal efficiency is automatically determined.

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)

nsamp

Number of subsamples which will be extracted to find the robust estimator, scalar. If nsamp=0 all subsets will be extracted. They will be (n choose p). If the number of all possible subset is <1000 the default is to extract all subsets otherwise just 1000.

refsteps

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

reftol

Tolerance for the refining steps. The default value is 1e-6

refstepsbestr

Scalar defining number of refining iterations for each best subset (default = 50).

reftolbestr

Tolerance for the refining steps for each of the best subsets. The default value is reftolbestr=1e-8.

minsctol

Value of tolerance for the iterative procedure for finding the minimum value of the scale for each subset and each of the best subsets (It is used by subroutine minscale.m). The default value is minsctol=1e-7.

bestr

Defins the number of "best betas" to remember from the subsamples. These will be later iterated until convergence (default is bestr=5).

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

msg

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

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.

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.

Value

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

Details

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

See Also

See Also as FSR_control, MMreg_control and LXS_control

Examples

Run this code
# NOT RUN {
(out <- fsreg(Y~., data=hbk, method="S", control=Sreg_control(bdp=0.25, nsamp=500)))
# }

Run the code above in your browser using DataCamp Workspace