Learn R Programming

DendroSync (version 0.1.5)

het.var: Variances per varGroup stratum for heteroscedastic models

Description

The function obtains the heteroscedastic variances for each varGroup elements for a selected model (mHeCS, mHeUN, mHeNE).

Usage

het.var(model)

Value

The function returns a numeric vector containing the variance per each level of varGroup. They are used internally to calculate synchrony (sync).

Arguments

model

a class "lme" model produced by dendro.varcov with homoscedastic equals FALSE.

Author

Josu G. Alday, Tatiana A. Shestakova, Victor Resco de Dios, Jordi Voltas

Details

The function extracts the variances for each varGroup stratum using the within-group heteroscedastic structure of the fitted models (varIdent constant variance per stratum). Note that this function only works for heteroscedastic models: mHeCS, mHeNE,mHeUN.

Examples

Run this code
## Calculate within-group heteroscedastic variances for conifersIP data:
 data(conifersIP)
 
 #Fit the heteroscedastic set of models (mBE, mHeCS, mHeNE, mHeUN)
 # using taxonomic grouping criteria (i.e. Species)
 ModHt <- dendro.varcov(TRW ~ Code, varTime = "Year", varGroup = "Species", 
                        data = conifersIP, homoscedastic = FALSE)
 
 #Obtain the within-group variances for the model of interest
 het.var(ModHt$mHeCS)#Heterogeneous variant of compound symmetry model
 het.var(ModHt$mHeUN)#Heterogeneous unstructured model
 

Run the code above in your browser using DataLab