lmeForm {BIOdry} | R Documentation |
LME formula
Description
This function computes LME formulas from multilevel ecological data series (MEDS).
Usage
lmeForm(rd, prim.cov = FALSE, resp = NULL, covar = NULL, lev.rm = NULL)
Arguments
rd |
|
prim.cov |
|
resp |
|
covar |
|
lev.rm |
|
Details
Formulas of the form resp ~ cov
| group
(see groupedData
function) are computed from MEDS. The formulas
can be implemented by
modelFrame
function to detrend MEDS
Value
formula
with any of the forms: resp ~ cov | group
or
~ cov
.
Author(s)
Wilson Lara <wilarhen@gmail.com>, Felipe Bravo <fbravo@pvs.uva.es>
References
Pinheiro J. C., D. M. Bates. 2000. Mixed-effects models in S and S-PLUS. Springer, New York.
Examples
##Multilevel ecological data series of tree-ring widths:
data(Prings05,envir = environment())
## LME formula:
form1 <- lmeForm(Prings05,prim.cov = FALSE)
print(form1)
## removing the sample level from the formula
form2 <- lmeForm(Prings05,lev.rm = 'sample')
form2 <- lmeForm(Prings05,lev.rm = 1)
## groupedData object with the LME formula
gdata <- groupedData(lmeForm(Prings05,lev.rm = 1),
data = Prings05)
plot(gdata,groups = ~ sample)