0
$\begingroup$

My data have one response and several predictors. These predictors are continous, not categorical. After regression, I wish to decompose the total ss on each predictor. With regard to this, I have several questions. First, is this anova? From my knowledge, anova requires the design matrix being orthogonal. But I also see some people use anova after regression. This really confuses me. Second, I have found Matlab gives one example using the procedure (first regression, then anova). The function is called anova(mdl). I wonder what is the exact calculation for the function. I really appreciate your help. Thanks.

$\endgroup$
0
$\begingroup$

It's easier to understand anova when the design matrix is orthogonal, but that is not a requirement. In general, there are various types of sums of squares that can be attributed to each term. For example, the simplest is Type 1, which defines the sum of squares explained by a term as the reduction in residual sum of squares when that term is added to the model containing the terms that come before it (so it evaluates the terms in a certain order).

If your model has only continuous linear terms, then the anova(mdl) syntax will define the sum of squares for any term as the increase in residual sum of squares when that term is removed from the full model. This would be equivalent to Type 2 and Type 3 sums of squares. In general, MATLAB uses something like Type 2 by default, except that the effect of term X is computed after first removing any terms like X^2 that contain it. There are optional arguments to the anova function that let you request a different type.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.