I am trying to use the function dredge() in the package MuMIn to compare AIC model-selection statistics for models of all possible combinations of variables.
It works with lm(y ~ ., data=data), but not with gls(y ~ ., data=data, complaining of an Error in terms.formula(as.formula(formula(x))): '.' in formula and no 'data' argument. I want to use the latter in order to specify a correlation structure so that I can correct for phylogenetic non-independence.
According to the MuMIn manual, it understands gls objects generated by nlme. Is there any way to get around this error aside from listing all the possible predictor variable combinations manually?
Many thanks in advance.
EDIT: Silly me; I just realised that I can simply specify all the predictor variables manually, rather than using a period. I would delete this question but that option doesn't seem to be available to me.