Hello everyone,

Sorry if my question is not clear, my first language is not English, but
Portuguese.

I am building a model for my data, using non-binomial error. I am having a
bit of a problem when updating the model to remove parameters that I no do
no autocorrelate with other variables (I have used a autocorrelation
function for this).

So my first model looks like this:

model1.glm.nb<-glm.nb(ozone ~ ., data=climate.dat)
summary(model1.glm.nb)
model1AIC.glm.nb<-stepAIC(model1.glm.nb)

When I run it, it doesn't give me any significance. So I run a second model,
with my autocorrelation table, and remove one more variable that does not
autocorrelate with other (anything below .07)

model2.glm.nb2 <- update(model1.glm.nb, ~ . - rain, data=climate.dat)
summary(model2.glm.nb2)

Now, when I run a 3rd. model to remove rain, it shows after summary that
rain has been removed. Once I do a forth model rain is again in it. How can
I remove more than one variable in one go?

I was thinking doing something like this:

model2.glm.nb2 <-update(model1.glm.nb, ~ . -rain, -temp, data=climate.dat)
summary(model2.glm.nb2)

Obviously using the - sign is not working and I am getting an error message.

Thank you for your help.

Michelle

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to