get.optimized.dendro: Fit the LG5 function

View source: R/DENDRO_BASE_FUNCTIONS.R

get.optimized.dendroR Documentation

Fit the LG5 function

Description

This is the wrapper for get.params() which uses base optim() (with two sequential methods) to estimate the parameters of the logistic function. This follows McMahon and Parker 2014. This function organizes output, skips removed datasets, fits a linear model to detect negative or non-significant growth, eliminates time series with small sample sizes, and removes identified outliers (see @identify.outliers ).

Usage

get.optimized.dendro(INPUT.data, no.neg.growth = TRUE, cutoff = 9,
  unit = "cm", par.names = c("L", "K", "doyip", "r", "theta", "a", "b",
  "r.squared", "ts.sd"), OUTPUT.folder = ".",
  param.table.name = "Param_table.csv",
  Dendro.data.name = "Dendro_data.Rdata",
  Dendro.split.name = "Dendro_data_split.Rdata")

Arguments

INPUT.data

A data.frame of a specific form (see @details)

no.neg.growth

logical denoting whether to skip any time series with negative trends (from a call to lm())

cutoff

Integer denoting the minimum sample size required to perform the optimization call.

unit

Character string denoting the unit that the dbh is in. Defaults to "cm".

par.names

A character vector of the column names of the params vector argument. This is used to pull out actual parameters from other information.

OUTPUT.folder

Character string for the target output folder.

param.table.name

Character string for the parameter table output.

Dendro.data.name

Character string for the data object, Dendro.complete, that is a complete data.frame table output.

Dendro.split.name

Character string for the data object, Dendro.split, that is a list vector where every entry is a separate time series of a band on a stem in a year.

Value

Objects Saves four files to the OUTPUT folder as named above and collected stems.


seanmcm/RDendrom documentation built on March 2, 2024, 3:53 p.m.