Francesc Montan�
2007-Sep-12 18:38 UTC
[R] Nested anova with unbalanced design and corrected sample size for spatial autocorrelation
Hello all, This may be a simple question to answer, but I'm a little bit stumped with respect to the calculation of the F statistics in nested anovas with unbalanced design in R. In my case, I have 11 vegetation transects (with 1000 10cmx10cm squares), where we estimated shrub cover. We have two different treatments: wildfire (4 transects) and prescribed burning (7 transects) and we want to compare the mean shrub cover between the 2 different treatments. I guess that I have to apply a one-way nested anova (transect number within treatment) with unbalanced number of samples (4000 in wildfire vs 7000 in prescribed burning). Moreover, I have to correct the initial sample size (1000 squares) to a corrected sample size by spatial autocorrelation (which in fact, makes all the n different between transects). Can anyone, please, tell me how to do this in R? Do I need to use lme()? Or is it possible to do it using aov()? Thanks a lot! Francesc PhD student University of Barcelona
Ben Bolker
2007-Sep-13 02:35 UTC
[R] Nested anova with unbalanced design and corrected sample size for spatial autocorrelation
Francesc Montan? <francesc.montane <at> ctfc.es> writes:> > > Hello all, > > This may be a simple question to answer, but I'm a little bit stumped with > respect to the calculation of the F statistics in nested anovas with > unbalanced design in R.I would strongly recommend getting a copy of Pinheiro and Bates (2000) and going through it. aov() is out of the question, and it's probably better to incorporate spatial correlation directly in the model than to adjust degrees of freedom to account for it. good luck, Ben Bolker>
High all, I would appreciate input about how the following survival model can be modeled in R and how competing risk models can generally be modeled. Also I would appreciate hints about resources that you are aware of that explain the use of survival models in R in greater detail. The data structure of my data is plotted below. My problem is that I don't know how to model 4 different events in the same hazard model for which the hazards are conditional on some other factor. Conditions: 0. All events are mutually exclusive 1. Either no event, Event1, or one of the Events 2-4 occurs (i.e. events 2-4 are competing) 2. Event1 can only occur if St.Beg=0 (it switches St.End from this period and St.Beg from the following periods on to 1 until Event4 occurs). 3. Event2-4 can only occur if St.Beg=1 Time St.Beg St.End Event1 Event2 Event3 Event4 Number 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 3 0 1 1 0 0 0 0 4 1 1 0 0 0 0 10 5 1 1 0 1 0 0 10 6 1 1 0 1 0 0 15 7 1 1 0 0 0 0 20 8 1 1 0 0 0 0 20 9 1 1 0 0 1 0 10 10 1 0 0 0 0 1 0 Thanks much for your help, Daniel ------------------------- cuncta stricte discussurus