Learn R Programming

BIOdry (version 0.2)

muleMan: Multilevel correlograms

Description

Multilevel Mantel correlograms between two modelFrame objects.

Usage

muleMan(rd, cd, rd.var = NULL, cd.var = NULL, plot.man = TRUE, 
    p.sig = 0.05, ...)

Arguments

rd
list or dataframe, such as that produced by modelFrame, containing the modeled tree growth.
cd
list or dataframe, such as that produced by modelFrame, with correspondatn modeled aridity (see details).
rd.var
character. Column name of the processed variable in code{rd}. If NULL then first column in rd is processed.
cd.var
character. Column name of the processed variable in cd. If NULL then its first column is used.
plot.man
Logical. Plot the multi-level correlogram. If TRUE then a plot at the common level is printed.
p.sig
Numeric. Threshold of significance in the plot.
...
Further arguments in mgram

Value

  • list with computed correlations

Details

Function mgram in package ecodist is implemented on two modelFrame objects, with the first object containing modeled tree growth, and the second one being the modeled aridity. Correspondant aridity model should have at least one level in common with the modeled growth (see example).

References

Lara W., F. Bravo, D. Maguire. 2013. Modeling patterns between drought and tree biomass growth from dendrochronological data: A multilevel approach. Agric. For. Meteorol., 178-179:140-151.

Examples

Run this code
## Tree growh and aridity are modeled, and both models are
## correlated.

##Multilevel data frame of tree-ring widths:
data(Prings05,envir = environment())
## Radial increments measured on 2003:
data(Pradii03,envir = environment())    
## Monthly precipitations and temperatures:
data(PTclim05,envir = environment())

## Modeled aridity
cf <- modelFrame(rd=PTclim05,
                 lv = list('year','year'),
                 fn = list('moveYr','wlai'),
                 form = 'lmeForm')
head(cf$resid)
summary(cf$model)

## Modeled tree growth
ar <- modelFrame(Prings05, y = Pradii03,
                 form = 'tdForm', on.time = TRUE,
                 MoreArgs = list(only.dup = TRUE,
                                 mp = c(1,1),un = c('mm','cm'),z = 2003))
head(ar$resid)
summary(ar$model)

## Multi-level correlogram
mancor <- muleMan(ar,cf,nperm = 10^3)
head(mancor)

Run the code above in your browser using DataLab