主要内容

SetTermStatus

Set status of model terms

    Description

    SetTermStatus(Model,Terms,Status) sets the status of all of the terms in the mbcmodel.linearmodel object.

    example

    Examples

    collapse all

    This example sets the status of the X1*X2^2 term to Never and the X1 term to Always.

    M = mbcmodel.CreateModel('Polynomial', 2);
    M.Properties = M.Properties.SetTermStatus([1 2; 1 0],
     {'Never',  'Always'});

    Input Arguments

    collapse all

    Linear model, specified as a mbcmodel.linearmodel object.

    Terms in mbcmodel.linearmodel object.

    Model term status, specified as cell array of character vectors.

    The stepwise status for each term can be 'Always', 'Never' or 'Step'. The status determines whether you can use the StepwiseRegression function to throw away terms in order to try to improve the predictive power of the model.

    Version History

    Introduced in R2007a