Dear All,

 I have questions on how correctly setting up random slopes and intercepts
given a nested sampling design for a friend.

She is interested on light availability in 3 different micro-habitats
within trees in a mountain gradient. For such, she sampled one location per
altitude level (loc, as factor). Within each loc, 15 trees were randomly
chosen (tree, as factor) and sun light was measured within 3 micro-habitats
from each tree (microhab, as factor). It complicates when we incorporate
another important variable: time (as continuous). Knowing that light varies
with time and that, for each loc, there is a difference in time from the
first to the last measured tree, we proposed the following model:

 light~microhab + (1|loc/tree) + (time|loc) + error (error normally
distributed )

 (1|loc/tree) accounts for random intercept of individual trees and
locations ;

(time|loc) stands for a random slope for light vs time (as early in the
morning the amount of light may increase and in the end of the day the
light may decrease from the first to the 15th measured tree within a give
location).

Given our data structure, does the random part make sense? Is this nested
model with random-intercepts and random-slope rightly specified?

 Moreover, as location is essentially the altitude level, i suppose it is
impossible to separate their effects including altitude as fixed effect
variable (i guess there would be no problem if there were many locations
per altitude level. And this would give us a model like
light~microhab+altitude+(1|loc/tree)+(time|loc)+error) . Is this thinking
correct?

 Many thanks for any advice

 Murilo

	[[alternative HTML version deleted]]

