[R] grouping explanatory variables into "sets" for GLMM
gunter.berton at gene.com
Fri Apr 4 05:55:06 CEST 2014
Unless there is reason to keep the conversation private, always reply
to the list. How will anyone else know that my answer wasn't
1. I don't intend to go through your references. A minimal
reproducible example of what you wish to do and what you tried would
2. Have you read An Intro to R?
Genentech Nonclinical Biostatistics
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch
On Thu, Apr 3, 2014 at 5:14 PM, Maria Kernecker, PhD
<mkernecker at gmail.com> wrote:
> Thanks for getting back to me.
> It seems I didn't write my question clearly and that it was misunderstood - even if it is easy to answer: I would like to reduce the number of explanatory variables in my model by using "sets" or categories that these variables belong to, like Rhodes et al. did in their chapter, or like Lentini et al. 2012 did in their paper.
> Factor is not the answer I am looking for, unfortunately.
> On Apr 3, 2014, at 11:28 AM, Bert Gunter wrote:
>> Have you read "An Introduction to R" (or other online tutorial)? If
>> not, please do so before posting further here. It sounds like you are
>> missing very basic knowledge -- on factors -- which you need to learn
>> about before proceeding.
>> gives you the answer you seek, I believe.
>> Bert Gunter
>> Genentech Nonclinical Biostatistics
>> (650) 467-7374
>> "Data is not information. Information is not knowledge. And knowledge
>> is certainly not wisdom."
>> H. Gilbert Welch
>> On Thu, Apr 3, 2014 at 6:54 AM, Maria Kernecker
>> <maria.kernecker at mail.mcgill.ca> wrote:
>>> Dear all,
>>> I am trying to run a GLMM following the procedure described by Rhodes et al. (Ch. 21) in the Zuur book Mixed effects models and extensions in R . Like in his example, I have four "sets" of explanatory variables:
>>> 1. Land use - 1 variable, factor (forest or agriculture)
>>> 2. Location - 1 variable, factor (riparian or upland)
>>> 3. Agricultural management - 3 variables that are binary (0 or 1 for till, manure, annual crop)
>>> 4. Vegetation patterns - 4 variables that are continuous (# of plant species in 4 different functional guilds)
>>> How do I create these "sets"? I would like to build my model with these "sets" only instead of listing every variable.
>>> Also: is there a way of running all possible models with the different combinations of these sets and/or variables, sort of like running ordistep for ordinations?
>>> Thanks a bunch in advance for your help!
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help