mb_reconstruction {mbr}R Documentation

Mass-balance-adjusted reconstruction

Description

Mass-balance-adjusted reconstruction

Usage

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

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

[Package mbr version 0.0.1 Index]