Hi,

I am new to R and would like some guidance on how to block by subject.

I collected presence/absence 24 hrs/day for 44 birds, denoted "bird", at 5
stations, denoted "colony" for the duration of a breeding season. The
breeding season was broken into biologically relevant time periods (3
levels), denoted "period". The birds were captured on 2 different colonies,
22 on each colony, denoted "homecolony". I also have the variable, "sex". I
have about 300,000 total observations for these 44 birds. This data is
temporally auto-correlated because it is VHF radio-telemetry data recorded
continually throughout the study.

I have a binary response variable, "present", with independent variables
"sex" at 2 levels, "homecolony" at 2 levels, "colony" at 5 levels, and
"period" at 3 levels. I would like to incorporate "period", "bird" and
"colony" as random effects. Fixed effects are "sex" and "homecolony". The
"bird" variable is what I want the model blocked by.

I am trying to answer the following questions: "Are there differences in
presence between sexes, homecolony, and period?" "Do birds from one
homecolony differ in their use of other colonies (colony)?"

I cannot figure out how to specify that I want the model to block by
subject, i.e. "bird". I have tried incorporating "bird" as a random effect,
but the degrees of freedom still come out to be close to 300,000 which is
near the total number of observations. Can anyone show me syntax that will
incorporate bird as a random effect that the model blocks by subject?

I tried following examples from Doug Bates' LME4 book, Chapter 4:
Glmm_FD <- lmer(present ~ 1 + gender + period + homecolony + colony + (1 +
period|bird), data = FD, family = binomial, REML = 0)
I know that the (1+period|bird) term is probably incorrect.

Any help or direction with this is appreciated!

Thanks,
Tiffanie

	[[alternative HTML version deleted]]


