Learn R Programming

functClust (version 0.1.6)

ftest: Test the significance of different variables of a functional clustering

Description

The function allows to test the relative significance of each component, of each assemblage and of each performance on the result of the functional clustering. The method is based on removing one after the other each component, assemblage or performance, then evaluating the effect of these deletions on the functional clustering. Each new functional clustering is compared with the functional clustering obtained with the whole dataset. The process is time-consuming.

Usage

ftest(fres,
      opt.var = c("components", "assemblages", "performances"),
      opt.nbMax = fres$nbOpt, opt.R2 = FALSE, opt.plot = FALSE )

Arguments

fres

an object resulting from a functional clustering obtained with the whole dataset using the function fclust.

opt.var

a string, that indicates the variable to test. The option can be "components", "assemblages" or "performances".

opt.nbMax

a logical. If opt.plot = TRUE, at each test, the tree resulting from removing each component, assemblage or performance is plotted.

opt.R2

a logical. If opt.R2 = TRUE, the primary tree is validated and the vectors of coefficient of determination (R^2) and efficiency (E) are computed.

opt.plot

a logical. If opt.plot = TRUE, at each test, the tree resulting from removing each component, assemblage or performance is plotted.

Value

a list of matrices, each matrix containing the results for a given clustering index.

Details

None.

Examples

Run this code
# NOT RUN {
# Enable the comments
oldOption <- getOption("verbose")
if (!oldOption) options(verbose = TRUE)
layout(matrix(c(1,2,3,4), nrow = 2, ncol = 2, byrow = TRUE))

# }
# NOT RUN {
# }
# NOT RUN {
# Test the significance of annual biomass production
test.perf <- ftest(fres = CedarCreek.2004.2006.res,
                   opt.var = c("performance"), opt.plot = TRUE)

# Test the significance of each component within each component cluster
test.comp <- ftest(fres = CedarCreek.2004.res,
                   opt.var = c("components"), opt.plot = TRUE)
# }
# NOT RUN {
layout(1)
options(verbose = oldOption)

# }

Run the code above in your browser using DataLab