Hi Everybody, I am trying to write some code but I am getting some strange results. I initiated a study where I took soil cores and I then made a number of measurements, on each core, for a variety of food web metrics. I took cores in three distinct desert habitats. In each habitat, I selected 6 trees, which I am treating as a plot. At each tree, I took 4 soil cores at two positions, relative to the tree trunk. I took 2 cores near the trunk and two cores in the bare area in close proximity. I refer to this as position. I repeated this whole sampling scheme at three dates, under all the same trees (season). My research question is "How do soil characteristics change by habitat, position, and season"? I wrote up a bit of code, which I present below. Some assumptions that I am making is the tree is a repeating variable in the model since I took cores at the same sets of trees over the course of the study. Another assumption that I am making is that habitat type and position (canopy vs. bare area) are both nested in tree. proc glm; class position habitat season tree; model lv1-lv45= season | habitat(tree) | position(tree); repeated tree; lsmeans season | habitat | position/pdiff; run; quit; I would like to partition my results into the following in the ANOVA output: Position Habitat Season Position* Habitat Position*Season Habitat*Season Position* Habitat*Season I am getting some strange output and several of my interactions are reporting 0 degrees of freedom. Would somebody mind reviewing my assumptions of nestedness and habitat? I think combining the nested variable with the repeating variable is the source of my errors. If you see an error in my code, would you mind pointing it out? Thank you! Karl
... View more