correlationMatrixFluxnet {amber}R Documentation

Correlation matrix for statistical metrics computed by AMBER for FLUXNET data

Description

This function produces a correlation matrices for mean values, bias, crmse, phase, and corresponding scores. The input data consist of text files produced by scores.fluxnet.csv.

Usage

correlationMatrixFluxnet(metric, inputDir, outputDir = FALSE,
  fileNames = c("GPP_FLUXNET", "HFLS_FLUXNET", "HFSS_FLUXNET",
  "NEE_FLUXNET", "RECO_FLUXNET", "RNS_FLUXNET"),
  significanceLevel = 0.01, plot.width = 8, plot.height = 6.8,
  plot.margin = c(10, 10, 1, 4))

Arguments

metric

A string that indicates for what statistical metric the correlation matrix should be computed. Options are 'mod.mean', ref.mean', bias', 'crmse', 'phase', 'bias.score', 'crmse.score', 'phase.score', or 'iav.score'.

inputDir

A string that gives the location of text files produced by scores.fluxnet.csv, e.g. '/home/project/study'.

outputDir

A string that gives the output directory, e.g. '/home/project/study'. The output will only be written if the user specifies an output directory.

fileNames

An object of strings that give the filenames that should be included. The default is c('GPP_FLUXNET', 'HFLS_FLUXNET', 'HFSS_FLUXNET', 'NEE_FLUXNET', 'RECO_FLUXNET', 'RNS_FLUXNET')

significanceLevel

A number that gives the desired significance level of a correlation, e.g. 0.01

plot.width

A number that gives the plot width, e.g. 8

plot.height

A number that gives the plot height, e.g. 6.8

plot.margin

An R object that gives the plot margin, e.g. c(10, 10, 1, 4)

Value

A list with the Spearman correlation coefficient and corresponding p-values, and a Figure of the correlation matrix

Examples

library(amber)
library(classInt)
library(doParallel)
library(foreach)
library(Hmisc)
library(latex2exp)
library(ncdf4)
library(parallel)
library(raster)
library(rgdal)
library(rgeos)
library(scico)
library(sp)
library(stats)
library(utils)
library(viridis)
library(xtable)

inputDir <- paste(system.file('extdata', package = 'amber'), 'scores', sep = '/')
correlationMatrixFluxnet(metric = 'bias', inputDir)


[Package amber version 1.0.3 Index]