mb_reconstruction: Mass-balance-adjusted reconstruction

Description Usage Arguments Value Details Examples

View source: R/mass-balance-optim.R

Description

Mass-balance-adjusted reconstruction

Usage

1
2
3
4
5
6
7
8
mb_reconstruction(
  instQ,
  pc.list,
  start.year,
  lambda = 1,
  log.trans = NULL,
  force.standardize = FALSE
)

Arguments

instQ

Instrumental data, in the same order as pc.list. The "season" column must be a factor.

pc.list

List of PC matrices. The first element is for the first season, second element for second season, and so on. The last element is for the annual reconstruction.

start.year

The first year of record

lambda

The penalty weight

log.trans

A vector containing indices of the targets to be log-transformed. If no transformation is needed, provide NULL.

force.standardize

If TRUE, all observations are standardized. See Details.

Value

A data.table with the following columns: season, year, Q, and lambda.

Details

If some targets are log transformed and some are not, they will have different scales, which affects the objective function. In this case the observations will be standardized so that they are in the same range. Otherwise, standardization are skipped for speed. However, in some cases you may want to standardize any ways, for example when flows in some months are much larger than in other months. In this case, set force.standardize = TRUE.

Examples

1
mb_reconstruction(p1Seasonal, pc3seasons, 1750, lambda = 1, log.trans = 1:3)

ntthung/mbr documentation built on March 19, 2021, 6:33 a.m.