[R] Stepwise selection with qAIC and qBIC

Xochitl CORMON Xochitl.Cormon at ifremer.fr
Wed Aug 28 17:34:51 CEST 2013


Dear list,

I am currently working with presence/absence GLM. Therefore I am using 
binomial family and selection my models this way :

null <- glm(respvarPAT ~ 1  , family = binomial, data = datafit)
full <- glm(respvarPAT ~ CSpp + FSpp + Gpp + Mpp + Ppp + Lpp + TempPoly2 
+ DepthPoly2 + DepthPoly3  , family = binomial, data = datafit)
model1 <- stepAIC(full, scope = list(lower = null, upper = full), 
direction = "backward") #AIC backward
model2 <- stepAIC(full, scope = list(lower = null, upper = full), 
direction = "backward", k=log(nobs(full))) #BIC backward
model3 <- stepAIC(null, scope = list(lower = null, upper = full), 
direction = "forward") #AIC forward
model4 <- stepAIC(null, scope = list(lower = null, upper = full), 
direction = "forward", k=log(nobs(full))) #BIC forward
model5 <- stepAIC(null, scope = list(lower = null, upper = full), 
direction = "both") #AIC both
model6 <- stepAIC(null, scope = list(lower = null, upper = full), 
direction = "both", k=log(nobs(full))) #BIC both

Every model generated are actually identical being :

glm(formula = respvarPAT ~ DepthPoly2 + DepthPoly3 + Gpp + Mpp + 
TempPoly2 + Lpp, family = binomial, data = datafit)

This worked pretty good for the last set of explanatory variables I used 
however for these ones I have a bit of overdispersion problem. 
Dispersion parameter for more complex model(full) being : 7.415653.

I looked into literature and found out that I should use qAIC and qBIC 
for selection. Thus my former stepwise selection is biased as using AIC 
and BIC (binomial family).

My question is to know if there is way to change the k parameter in 
stepAIC in order to get quasi criterion. If not is there a way to 
automatize the selection using this criterion and having the dispersion 
parameter, customizing stepAIC function for example? Unfortunately I am 
reaching here my abilities in statistics and programming and cannot 
figure out if what I want to do is doable or not.

Thank you for your help,

Regards,

Xochitl C.

-- 

<>< <>< <>< <><

Xochitl CORMON
+33 (0)3 21 99 56 84

Doctorante en sciences halieutiques
PhD student in fishery sciences

<>< <>< <>< <><

IFREMER
Centre Manche Mer du Nord
150 quai Gambetta
62200 Boulogne-sur-Mer

<>< <>< <>< <><



More information about the R-help mailing list