Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

`mdl1 = removeTerms(mdl,terms)`

returns
a linear regression model `mdl1`

= removeTerms(`mdl`

,`terms`

)`mdl1`

that is the same
as the input model `mdl`

, but with terms removed
as specified by `terms`

.

Wilkinson notation describes the factors present in models. The notation relates to factors present in models, not to the multipliers (coefficients) of those factors.

Wilkinson Notation | Factors in Standard Notation |
---|---|

`1` | Constant (intercept) term |

`A^k` , where `k` is a positive
integer | `A` , `A` ,
..., `A` |

`A + B` | `A` , `B` |

`A*B` | `A` , `B` , `A*B` |

`A:B` | `A*B` only |

`-B` | Do not include `B` |

`A*B + C` | `A` , `B` , `C` , `A*B` |

`A + B + C + A:B` | `A` , `B` , `C` , `A*B` |

`A*B*C - A:B:C` | `A` , `B` , `C` , `A*B` , `A*C` , `B*C` |

`A*(B + C)` | `A` , `B` , `C` , `A*B` , `A*C` |

Statistics and Machine Learning Toolbox™ notation always includes a constant term
unless you explicitly remove the term using `-1`

.

For details, see Wilkinson and Rogers [1].

[1] Wilkinson, G. N., and C. E. Rogers. *Symbolic
description of factorial models for analysis of variance.* J.
Royal Statistics Society 22, pp. 392–399, 1973.

Use `stepwiselm`

to select
a model from a starting model, continuing until no single step is
beneficial.

Use `addTerms`

to
add particular terms.

Use `step`

to
optimally improve the model by adding or removing terms.

Was this topic helpful?