[R] basic query relating to GLMM model design
Sharada Ramadass
sharada.ramadass at gmail.com
Wed May 10 07:15:06 CEST 2017
Hello,
I am a newbie to R and GLMM and having a difficult time
understanding the model design that best captures my test scenario.
I am interested in the following question:
1. whether average values of a variable explain a certain response
lesser than individual values.
1.1. For this, I have a single response, say y.
1.2. I have a bunch of fixed predictors, say x1, x2, x3 and I can
derive my models for those.
1.3 I have two kinds of random effects - a site (r1) and a species
(r2), within the site. My average values of some of the fixed
predictors is based on the species (r2).
I am not especially interested in looking at site level variations,
but I did build it into the model, all the same.
So, I was able to develop a set of models with the individual values like so:
y ~ x1+ x2 + x3 + (1|r1/r2)
I was able to get some output in terms of significance for certain
parameter estimates. So far, its ok.
Now, I wanted to test whether the average values of x1 and x2 based on
r2 will predict y with less powerful estimates. My doubt is whether in
that case, r2 should be removed from the random variable since I now
actually have average values for all x1 and x2 for a certain value of
r2.
Basically is the below model with average values logically wrong?
y ~ x1avg + x2avg + x3 + (1|r1/r2)
my averages for x1 and x2 are over each value of r2.
Should r2 move to a fixed effect or be removed totally from the model?
Any inputs would be appreciated.
Thanks and Regards,
Sharada
More information about the R-help
mailing list