## 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