Displaying 1 result from an estimated 1 matches for "stepglm2".
2009 Jan 26
1
glm StepAIC with all interactions and update to remove a term vs. glm specifying all but a few terms and stepAIC
...this
with trace=T also. Here is the code used:
>glm1<-glm(formula = PRESENCE == "1" ~ SNOW + I(SNOW^2) + POP_DEN + ROAD_DE
+ ADJELEV + I(ADJELEV^2) + TRI + I(TRI^2) + EDGE + I(EDGE^2) + TREECOV +
I(TREECOV^2),family = binomial, data = wolv)
summary(glm1)
>library(MASS)
>stepglm2<-stepAIC(glm1,scope=list(upper=~.^2,lower=NULL),
trace=T,k=log(4828),direction="both")
> summary(stepglm2)
> extractAIC(stepglm2,k=log(4828))
This results in a 15 term model with a BIC of 3758.659
> Coefficients:
> Estimate Std....