主要内容

StepwiseRegression

Change stepwise selection status for specified terms

    Description

    [s, outmodel] = StepwiseRegression(inmodel) returns the Stepwise table (as in the current stepwise values for ParameterStatistics).

    example

    [s, outmodel] = StepwiseRegression(inmodel,toggleTerms) toggles between in and out for particular parameters.

    Examples

    collapse all

    Return the stepwise table of the knot model.

    [S, knot] = StepwiseRegression(knot)
    
    S =
    
      1.0e+003 *
    
        0.1316    0.0606    0.0200       NaN
        0.0000    0.0000    0.0200    2.0919
        0.0000    0.0000    0.0190    0.2828
       -0.0000    0.0000    0.0190    0.2531
        0.0000    0.0000    0.0190    0.2680
       -0.0551    0.0347    0.0200    0.2566
        0.0919    0.0264    0.0200    0.3672
       -0.0040    0.0023    0.0200    0.2564
       -0.0178    0.0095    0.0200    0.2644
        0.0008    0.0004    0.0200    0.2787

    This example shown toggles parameter 4, after inspection of the Next PRESS column indicates changing the status of this term will result in the lowest PRESS.

    [S, knot] = StepwiseRegression(knot, 4)
    params = knot.Parameters;
    N = params.StepwiseSelection
    S =
    
      129.8406   60.1899   19.0000       NaN
        0.0048    0.0008   19.0000  662.3830
        0.0000    0.0000   18.0000  290.8862
       -0.0021    0.0019   19.0000  245.9833
        0.0001    0.0002   18.0000  281.4104
      -50.4091   34.7401   19.0000  262.8346
       94.9675   26.3690   19.0000  400.6572
       -4.0887    2.2488   19.0000  262.6588
      -17.9412    9.4611   19.0000  276.7535
        0.8229    0.3734   19.0000  292.0827
    
    N = 
        'in'
        'in'
        'out'
        'in'
        'out'
        'in'
        'in'
        'in'
        'in'
        'in'
    

    Input Arguments

    collapse all

    Input model object, specified as a mbcmodel.linearmodel object.

    Parameters to toggle, specified as an array, a real positive integer, 0 (False) or 1 (true).

    Output Arguments

    collapse all

    Output model object, specified as a mbcmodel.linearmodel object.

    New stepwise values, returned as a table.

    The Stepwise values returned are the same as those found in the table in the Stepwise GUI. For each parameter, the columns are: the value of the coefficient, the standard error of the coefficient, the t value and Next PRESS (the value of PRESS if the status of this term is changed at the next iteration). Look for the lowest Next PRESS to indicate which terms to toggle in order to improve the predictive power of the model.

    More About

    collapse all

    Version History

    Introduced before R2006a