0
$\begingroup$

Consider the following case: we have continuous response A, and indicator B,C,D.

> drop1(lm(A~B+C*D,data = data))

        AIC
<None>  -154
others  >-154
> drop1(lm(A~B+C+D,data = data))
        AIC
<None>  -145
others  >-145
> AIC(lm(A~B+C*D+0)
171
> AIC(lm(A~B+C*D))
163
> AIC(lm(A~B+C+D+0)) 
169
> AIC(lm(A~B+C+D))
171.5

As we can see with interaction C and D, removing the intercept

So does this mean that

lm(A~B+C*D) 

is the best model?

If so, this leads to my next set of questions: is the row indicating the original model that have not dropped anything? Can Drop1 not drop the intercept?

How do we view the actual source code of drop1? Because using View(drop1) returns

function (object, scope, ...) 
UseMethod("drop1")
$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.