When analyzing information, one usually wants to check two regression fashions to find out which one suits greatest to a chunk of knowledge. Typically, one mannequin is a easier model of a extra complicated mannequin that features further parameters. Nonetheless, extra parameters don’t at all times assure {that a} extra complicated mannequin is definitely higher, as they may merely overfit the information.
To find out whether or not the added complexity is statistically important, we are able to use what’s referred to as the F-test for nested fashions. This statistical approach evaluates whether or not the discount within the Residual Sum of Squares (RSS) because of the further parameters is significant or simply resulting from probability.
On this article I clarify the F-test for nested fashions after which I current a step-by-step algorithm, exhibit its implementation utilizing pseudocode, and supply Matlab code that you would be able to run straight away or re-implement in your favourite system (right here I selected Matlab as a result of it gave me fast entry to statistics and becoming capabilities, on which I didn’t need to spend time). All through the article we’ll see examples of the F-test for nested fashions at work in a few settings together with some examples I constructed into the instance Matlab code.