FSMbsb

FSMbsb gives the units belonging to subset at step(s) msel of the forward search

Syntax

Description

example

Un =FSMbsb(Y, bsb) FSMbsb with all default options.

example

Un =FSMbsb(Y, bsb, Name, Value) FSMbsb with optional argument.

example

[Un, BB] =FSMbsb(___) Monitoring the units belonging to subset in each step.

Examples

expand all

  • FSMbsb with all default options.
  • n=200;
    v=3;
    randn('state',123456);
    Y=randn(n,v);
    %Contaminated data
    Ycont=Y;
    seqcont=11:10:51;
    disp('Contaminated units')
    disp(seqcont)
    Ycont(seqcont,:)=Ycont(seqcont,:)+2.5;
    Un=FSMbsb(Ycont,0);

  • FSMbsb with optional argument.
  • n=200;
    v=3;
    randn('state',123456);
    Y=randn(n,v);
    %Contaminated data
    Ycont=Y;
    seqcont=11:10:51;
    disp('Contaminated units')
    disp(seqcont)
    Ycont(seqcont,:)=Ycont(seqcont,:)+2.5;
    % Analyse the units forming subset in step msel=195
    msel=195;
    [~,BBsel]=FSMbsb(Ycont,0,'bsbsteps',msel);
    disp(['Units outside subset at step m=' num2str(msel)])
    disp(setdiff(1:n,BBsel))

  • Monitoring the units belonging to subset in each step.
  • n=200;
    v=3;
    randn('state',123456);
    Y=randn(n,v);
    %Contaminated data
    Ycont=Y;
    seqcont=11:10:51;
    disp('Contaminated units')
    disp(seqcont)
    Ycont(seqcont,:)=Ycont(seqcont,:)+2.5;
    % Analyse the units forming subset in step msel=195
    msel=195;
    [~,BBsel]=FSMbsb(Ycont,0,'bsbsteps',msel);
    seq=1:n;
    disp(['Units outside subset at step m=' num2str(msel)])
    disp(setdiff(seq,BBsel))
    Contaminated units
        11    21    31    41    51
    
    Units outside subset at step m=195
        11    21    31    41    51
    
    

    Related Examples

    expand all

  • Specifying the point where to start monitoring.
  • Specifying the point where to start monitoring units belongng to subset.

    n=200;
    v=3;
    randn('state',123456);
    Y=randn(n,v);
    % Contaminated data
    Ycont=Y;
    seqcont=11:10:51;
    disp('Contaminated units')
    disp(seqcont)
    Ycont(seqcont,:)=Ycont(seqcont,:)+2.5;
    % Analyse the units forming subset in step msel=195
    msel=195;
    [Un,BBsel]=FSMbsb(Ycont,0,'bsbsteps',msel,'init',100);
    seq=1:n;
    disp(['Units outside subset at step m=' num2str(msel)])
    disp(setdiff(seq,BBsel))

    Input Arguments

    expand all

    Y — Input data. Matrix.

    n x v data matrix; n observations and v variables. Rows of Y represent observations, and columns represent variables.

    Missing values (NaN's) and infinite values (Inf's) are allowed, since observations (rows) with missing or infinite values will automatically be excluded from the computations.

    Data Types: single|double

    bsb — Units forming subset. Vector.

    List of units forming the initial subset.

    If bsb=0 (default) then the procedure starts with p units randomly chosen else if bsb is not 0 the search will start with m0=length(bsb)

    Data Types: single|double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'init',50 , 'msg',false , 'nocheck',1 , 'plots',0

    bsbsteps —Save the units forming subsets in selected steps.vector.

    It specifies for which steps of the fwd search it is necessary to save the units forming subset. If bsbsteps is 0 we store the units forming subset in all steps. The default is store the units forming subset in all steps if n<=5000, else to store the units forming subset at steps init and steps which are multiple of 100. For example, as default, if n=7530 and init=6, units forming subset are stored for m=init, 100, 200, ..., 7500.

    Example: 'bsbsteps',[100 200] stores the unis forming subset in steps 100 and 200.

    Data Types: double

    init —Point where to start monitoring required diagnostics.scalar.

    Note that if bsb is supplied, init>=length(bsb). If init is not specified it will be set equal to floor(n*0.6).

    Example: 'init',50

    Data Types: double

    msg —It controls whether to display or not messages about great interchange on the screen.boolean.

    If msg==true (default) messages are displyed on the screen else no message is displayed on the screen

    Example: 'msg',false

    Data Types: logical

    nocheck —It controls whether to perform checks on matrix Y.scalar.

    If nocheck is equal to 1 no check is performed on matrix Y.

    As default nocheck=0.

    Example: 'nocheck',1

    Data Types: double

    plots —Plot on the screen.scalar.

    If plots=1, a plot of the monitoring of minMD among the units not belonging to the subset is produced on the screen with 1 per cent, 50 per cent and 99 per cent confidence bands else (default) no plot is produced.

    Example: 'plots',0

    Data Types: double

    Output Arguments

    expand all

    Un —Units included in each step. Matrix

    (n-init) x 11 Matrix which contains the unit(s) included in the subset at each step of the search.

    REMARK: in every step the new subset is compared with the old subset. Un contains the unit(s) present in the new subset but not in the old one.

    Un(1,2) for example contains the unit included in step init+1.

    Un(end,2) contains the units included in the final step of the search.

    BB —Units belonging to subset in each step or selected steps. Matrix

    n-by-(n-init+1) or n-by-length(bsbsteps) matrix which contains the units belonging to the subset at each step (or in selected steps as specified by optional vector bsbsteps) of the forward search.

    More precisely: BB(:,1) contains the units forming subset in step bsbsteps(1);

    ....;

    BB(:,end) contains the units forming subset in step bsbsteps(end);

    Row 1 of matrix BB is referred to unit 1;

    ......;

    Row n of matrix BB is referred to unit n;

    Units not belonging to subset are denoted with NaN.

    References

    Atkinson, A.C., Riani, M. and Cerioli, A. (2004), "Exploring multivariate data with the forward search", Springer Verlag, New York.

    This page has been automatically generated by our routine publishFS