Home R - Subsetting in dredge (MuMin) – only include interaction with b if also an interaction with a
Reply: 0

R - Subsetting in dredge (MuMin) – only include interaction with b if also an interaction with a

user1330
1#
user1330 Published in April 24, 2018, 10:27 am

I am new to R and a first-time poster here so forgive me if I haven’t phrased this quite right…

I am wanting to use dredge::MuMIn to explore my data. I only want to include an interaction between I(GISalt^2) and one of the other environmental variables if there is also an interaction between the variable and GISalt.

e.g. I would like to keep:

(GISalt * Forest) AND (I(GISalt^2) * Forest)
mod1 <- glm(MLE2017 ~ MLE200405 + (GISalt * Forest) + Scrub + I(GISalt^2) * Forest)

and

(GISalt * Forest) but NOT I(GISalt^2) * Forest)
mod2 <- glm(MLE2017 ~ MLE200405 + (GISalt * Forest) + Scrub)

and to exclude:

I(GISalt^2) * Forest) but NOT GISalt * Forest) mod3 <- glm(MLE2017 ~ MLE200405 + Scrub + I(GISalt^2) * Forest)

global model containing all variables for dredge()

globmod <- glm(MLE2017 ~ MLE200405 + GISalt * Forest + GISalt * Scrub 
    + GISalt * Meadow + GISalt * RiverLgthm + GISalt * DailySunHrs  + 
    I(GISalt^2) * Forest + I(GISalt^2) * Scrub + I(GISalt^2) * Meadow +
    I(GISalt^2) * RiverLgthm + I(GISalt^2) * DailySunHrs, 
    data = GLMdata, family = x.quasipoisson(link = "log"))

Many thanks in advance

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306515 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO