Learn R Programming

BIOdry (version 0.4)

tdForm: ltd formulas

Description

This function formulates linear time-decline formulas (ltd) from multilevel ecological data series.

Usage

tdForm(rd, prim.cov = FALSE, on.time = TRUE, log.t = FALSE, lev.rm = NULL)

Arguments

rd
data.frame or character vector. Multilevel ecological data series or vector of ecological factors.
prim.cov
logical. Print a primary covariate form: '~ cov'. If FALSE then a complete formula: 'resp ~ cov | group' is printed.
on.time
logical. If TRUE then t = 'time' (see rtimes). If FALSE then t = 'year'.
log.t
logical. If TRUE then f(t) = ln(t). Default FALSE produces a td form
lev.rm
NULL or character name of the ecological factor(s) in the MEDS to be removed from the formula.

Value

with the forms: 'resp ~ cov | group' or '~ cov'.

Details

the ltd formulas belong to following general equation: log (x) = log (cs) + f(t); where the relative organic growth (x) are explained by the cumulative organic growth (cs) plus a function of time f(t); with f(t) being either the time or a logarithmic transformation the time. The ltd can be implemented by modelFrame function to detrend organic MEDS

References

Zeide B. 1993. Analysis of Growth Equations. For. Sci., 39: 594-616.

Examples

Run this code
## an ltd formula:
lev <- c('plot','tree')
tdeq <- tdForm(lev,log.t = TRUE)
tdeq
## (not run) only primary covariate:
tdeq1 <- tdForm(lev,prim.cov = TRUE)
tdeq1
##Multilevel data frame of tree-ring widths:
data(Prings05,envir = environment())
## removing two levels: 'plot' and 'tree' from the formula
tdea2 <- tdForm(Prings05, lev.rm = c('plot','tree'))
tdea2 <- tdForm(Prings05, lev.rm = 2:3)

Run the code above in your browser using DataLab