[R] Difference between stats.steps() and MuMIn.dredge() to select best fit model

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Thu Aug 1 18:06:28 CEST 2024


В Wed, 31 Jul 2024 11:56:55 +0000
c.buhtz using posteo.jp пишет:

> step() explore the model space with a step wise approach.
> And dredge() try out all possible combinations of the variables.
>
> But isn't that the same? I might have a mental block on this.
> 
> Which model (formula) would dredge() "test" that step() wouldn't?`

Suppose that the predictors a, b, c, d, e, f are arranged in the
descending order of contribution to the model.

Consider a forward stepwise algorithm that is asked to choose three
variables.

It starts by testing a, b, c, d, e, f, and chooses a.

It continues by testing a + b, a + c, a + d, a + e, a + f, and chooses
a + b.

It continues by testing a + b + c, a + b + d, a + b + e, a + b + f, and
chooses a + b + c.

By being greedy, it doesn't consider, for example, the model d + e + f,
because for that it would have to pick d before a.

A greedy algorithm for K variables out N tests N + (N-1) + ... +
(N-K+1) = N*K - K(K-1)/2 models. An exhaustive search would have to test
choose(N,K) = N!/(N-K)!/K! models.

-- 
Best regards,
Ivan



More information about the R-help mailing list