Andrew MacIntosh
2011-Aug-26 05:53 UTC
[R] excluding models during dredge and model averaging in MuMIn
Dear R Users, I am using the package "MuMIn" to sort through models, with the goal of estimating parameters through model averaging of the candidate set. I have been using the dredge function to build all possible models based on my starting point (hypothetical global model). I see that there is a simple way to control which models are excluded from this set... # exclude models containing both X1 and X2>dredge(x, subset = !(X1 & X2))However, I would like to add to this and exclude 4 different combinations of predictors (i.e. X1&X2, X1&X3, X2&X3, X1&X2&X3). I would very much appreciate it if somebody had any ideas about how to tackle this. Also, Cheers, Andrew Andrew JJ MacIntosh, D. Sc. Center for International Collaboration and Advanced Studies in Primatology Kyoto University Primate Research Institute Kanrin 41-2 Inuyama Aichi Japan 484-8506 website: http://www.wix.com/andyjmac/andrew-macintosh
Kamil BartoĊ
2011-Sep-06 13:14 UTC
[R] excluding models during dredge and model averaging in MuMIn
> dredge(x, subset = !(X1 & (X2 | X3)) & !(X2 & X3) & !(X1 & X3))see > help("Logic", "base") Dnia 2011-08-26 12:00, r-help-request at r-project.org pisze:> ------------------------------ > > Message: 157 > Date: Fri, 26 Aug 2011 14:53:00 +0900 > From: Andrew MacIntosh<andyjmac at gmail.com> > To:R-help at r-project.org > Subject: [R] excluding models during dredge and model averaging in > MuMIn > Message-ID: > <CAPSAZ9RirdzXyn22JySmbUNV7DVdWZBh44StAb7wJcDtTE_91w at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Dear R Users, > > I am using the package "MuMIn" to sort through models, with the goal > of estimating parameters through model averaging of the candidate set. > I have been using the dredge function to build all possible models > based on my starting point (hypothetical global model). I see that > there is a simple way to control which models are excluded from this > set... > > # exclude models containing both X1 and X2 >> >dredge(x, subset = !(X1& X2)) > However, I would like to add to this and exclude 4 different > combinations of predictors (i.e. X1&X2, X1&X3, X2&X3, X1&X2&X3). > > I would very much appreciate it if somebody had any ideas about how to > tackle this. Also, > > Cheers, > Andrew