Re: [R] Nested variables

2009-06-03 Thread DanielWC
>>What happens if you do something like the following? >>zeroinfl(Visitation ~ Sps*Habitat/Site - Sps:Habitat:Site, data = data1) >>zeroinfl(Visitation ~ Sps*Habitat/Site - Sps - Sps:Habitat:Site, data = data1) It seems to be working. Heres the model: nes3<-zeroinfl(Visitation ~ Sps + TP + R

Re: [R] Nested variables

2009-06-03 Thread Mark Difford
Hi Daniel, >> It now only displays Habitat and not Site which it take is because Site >> has been nested within >> Habitat (?). No. Start with a simple model and look at the coefficients. That way you will be able to match the model you want to its symbolic representation. Then built it up (do

Re: [R] Nested variables

2009-06-02 Thread Mark Difford
Hi Daniel, >> I read the chapter and it says that I can nest B in A by writing A/B. But >> it doesnt seem to >> work properly. Then you need to read it again, and you need to play with some simple models, so that you learn how to specify a model properly, using the formula interface. (Achim Zei

Re: [R] Nested variables

2009-06-02 Thread DanielWC
Hi again I read the chapter and it says that I can nest B in A by writing A/B. But it doesnt seem to work properly. The package I use is pscl, I am trying to model zero inflated data. Here is the full model: zip1<-zeroinfl(Visitation ~ Habitat/Site + Sps + TP + Resource + Sps*Habitat/Site + Sps*R

Re: [R] Nested variables

2009-06-01 Thread DanielWC
Hi. Yes I am trying to model such data, and i need R to know that Site is nested within Habitat. Do I use some kind of command before running the model (like factor() and so on) or do i write it in the model formula. If so, how? Thanks Douglas Bates-2 wrote: > > On Fri, May 29, 2009 at 7:50

Re: [R] Nested variables

2009-06-01 Thread Mark Difford
Daniel, >> Yes I am trying to model such data, and i need R to know that Site is >> nested within Habitat. >> Do I use some kind of command before running the model (like factor() and >> so on) or do i >> write it in the model formula. If so, how? You still are not telling the list enough, sin

Re: [R] Nested variables

2009-05-29 Thread Douglas Bates
On Fri, May 29, 2009 at 7:50 AM, DanielWC wrote: > Hello > I am working with a biological data including variables called Habitat and > Site, example: > Habitat     Site > Forest      Low > Forest      Low > Forest      High > Forest      High > I want to tell R that the Site variable is neste

[R] Nested variables

2009-05-29 Thread DanielWC
Hello Im am working with a biological data including variables called Habitat and Site, example: Habitat Site Forest Low Forest Low Forest High Forest High I want to tell R that the Site variable is nested within the Forest variable (that it is not a new variable). Does