I have found the problem and a solution.
The problem comes from the functions addterm.glm() and dropterm.glm()
from MASS package. They use extractAIC() without transmitting the ...
argument:
aic <- aic + (extractAIC(object, k = k)[2L] - aic[1L])
I replace the call with:
aic <- aic + (extractAIC(object, k = k, ...)[2L] - aic[1L])
and I create dropterm.glm() and addterm.glm() in global environnement.
I add:
dropterm <- dropterm.lm <- dropterm.glm
addterm <- addterm.lm <- addterm.glm
I copy also stepAIC from MASS package to global environnement.
I detach MASS package, and it works:
> stepAIC(G1, criteria="AICc", steps = 1)
Start: AIC=70.06
x ~ A + B
Df Deviance AIC
- A 1 48.506 68.355
<none> 47.548 70.055
- B 1 57.350 70.867
Now stepAIC can use AICc
Marc
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.