het.var: Variances per varGroup stratum for heteroscedastic models

View source: R/het.var.R

het.varR Documentation

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)

Arguments

model

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

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.

Value

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

Author(s)

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

Examples

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

DendroSync documentation built on May 28, 2022, 1:22 a.m.