combineUncertainty: An evolution of 'greenProcess' for the combination of...

View source: R/combineUncertainty.R

combineUncertaintyR Documentation

An evolution of greenProcess for the combination of uncertainty after processing

Description

The combineUncertainty uses greenProcess to fit all available double logistic equations in the phenopix package and extracts thresholds with all available methods. Then uncertainties can be combined and returned by using summarizePhases and plotted with plotSum. See greenProcess.

Usage

combineUncertainty(ts, which='all', nrep=50, ncores='all')

Arguments

ts

A ts or zoo object with gcc data. index(ts) must be numeric days of year (doys) or a POSIXct vector

which

It can be 'all' (default) and all 4 double logistic fits will be calculated (beck, elmore, elosterman, gu), or a vector of subsets of the four fits

nrep

Number of relications to estimate uncertainty for each single fitting, defaults to 50.

ncores

Number of processors to be used in parallel computation, defaults to 'all' which will accidentally slow down any other activity on your computer. Otherwise set the number of processors you want to use in parallelization.

Details

This function uses greenProcess to fit all available double logistic equations in the phenopix package and extracts thresholds with all available methods. Then uncertainties can be combined and returned by using summarizePhases and plotted with plotSum. See greenProcess, summarizePhases, plotSum. This function uses a modellistic approach to combine all uncertainties from all available phenopix fittings, as to get an ensemble of phases with different methods, without necessarily choosing any of them.

Value

A named list with dataframes for each phenophase method with all replication for each of the included fitting methods. These data can then be combined with the companion functions summarizePhases and plotSum. See examples for details.

Author(s)

Gianluca Filippa <gian.filippa@gmail.com>

Examples

## Not run: 
  require(zoo) 
  data(bartlett2009.filtered)
  combined.fit <- combineUncertainty(na.approx(bartlett2009.filtered), nrep=100)
# 100 replications for each fitting
  names(combined.fit) # a dataframe for each phenoMethod + a list with all fittings
  fit.summary <- summarizePhases(combined.fit, across.methods=TRUE)
## again a list with one element for each fitting method + two additional items 
## if across.methods is TRUE, which combines gu + klosterman phenophase methods 
## in a single method, and the same happens for trs and derivatives
  plotSum(bartlett2009.filtered, fit.summary, which='klosterman')
## a plot with original timeseries + phenophases and their uncertainty
  
## End(Not run)
  

phenopix documentation built on Aug. 9, 2023, 5:10 p.m.