Learn R Programming

DendroSync (version 0.1.4)

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)

Arguments

model

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

Value

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

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
# NOT RUN {
## 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