balanceResidual: Balance Residual

Description Usage Arguments Details Value

Description

This function forces a balance in the passed elements by allocating the imbalance to one element.

Usage

1
2
3
balanceResidual(data, standParams, feedCommodities = c(),
  indCommodities = c(), primaryCommodities = c(),
  foodProcessCommodities = c(), imbalanceThreshold = 10)

Arguments

data

The data.table containing the full dataset for standardization.

standParams

The parameters for standardization. These parameters provide information about the columns of data and tree, specifying (for example) which columns should be standardized, which columns represent parents/children, etc.

feedCommodities

Sometimes excess supply will need to be allocated to some processed product. The default is to place it into food, but this list specifies which elements should allocate such a difference to feed.

indCommodities

Same as feedCommodities, but for commodities where we allocate the difference to industrial utilization.

foodProcessCommodities

Same as feedCommodities, but for commodities where we allocate the difference to food processing.

imbalanceThreshold

The size that the imbalance must be in order for an adjustment to be made.

Details

If supply < utilization, the imbalance is always assigned to production (as trade is generally assumed to be fixed and stock changes are usually 0 and hence also fixed).

If supply > utilization, we must choose where to allocate the imbalance. The default variable is food, but for some commodities we could instead use feed, food processing, or industrial.

Value

Nothing is returned, but the Value column of the passed data.table is updated.


SWS-Methodology/faoswsAupus documentation built on May 9, 2019, 11:45 a.m.