Dear all,

I have a question about the glmulti package. I want to include some variables in all models. To that end I applied the wrapper function as shown in the examples (http://www.inside-r.org/packages/cran/glmulti/docs/glmulti).

To include the variable "Geslacht" in all models:

> glm.redefined = function(formula, data, always="", ...) {glm(as.formula(paste(deparse(formula), always)), data=data, ...)}
> output<-glmulti(ZBK3~  Onafhankelijk*Zelfconcept*Hyperactief*Populariteit, data=IME, fitfunc=glm.redefined, level=2, crit=aic, method="g", always= "+Geslacht")

However, in the output, the variable "Geslacht" is not included... :
> print(output)
glmulti.analysis
Method: g / Fitting: glm.redefined / IC used: aic
Level: 2 / Marginality: FALSE
>From 100 models:
Best IC: -1212.52589228289
Best model:
[1] "ZBK3 ~ 1 + Onafhankelijk + Hyperactief + Populariteit + Populariteit:Onafhankelijk + "
[2] "    Populariteit:Zelfconcept + Populariteit:Hyperactief"
[1] "ZBK3 ~ 1 + Onafhankelijk + Hyperactief + Populariteit + Populariteit:Onafhankelijk"
[1] "ZBK3 ~ 1 + Onafhankelijk + Hyperactief + Populariteit + Populariteit:Onafhankelijk + "
[2] "    Populariteit:Zelfconcept"
[1] "ZBK3 ~ 1 + Onafhankelijk + Hyperactief + Populariteit + Populariteit:Onafhankelijk + "
[2] "    Populariteit:Hyperactief"
Evidence weight: 0.0594426803705217
Worst IC: -1203.94552868636
16 models within 2 IC units.
67 models to reach 95% of evidence weight.
Convergence after 700 generations.
Time elapsed: 4.5986722668012 minutes.


Hopefully you can tell me what is wrong here.

Thank you very much in advance,

Kind regards,

Machteld

Machteld Vandecandelaere
University of Leuven - Centre for Educational Effectiveness and Evaluation
Dekenstraat 2, box 3773 - room VHI 2.43
B-3000 Leuven
Tel: + 0032 16 325 780
E-mail: Machteld.Vandecandelaere@ppw.kuleuven.be<mailto:Machteld.Vandecandelaere@ppw.kuleuven.be>
URL: http://ppw.kuleuven.be/o_en_o/COE



	[[alternative HTML version deleted]]

