computeMedianUnitValue: Compute the median unit value of the transaction.

View source: R/computeMedianUnitValue.R

computeMedianUnitValueR Documentation

Compute the median unit value of the transaction.

Description

The median unit value is calculated in a specific-to-generic fashion: 1) by HS-reporter; 2) by HS8-reporter; by HS6-reporter; 3) by HS; 4) by FCL; 5) by flow. The first available of these options will be used (for HS, HS8 and HS6 only when there are at least 10 flows).

Usage

computeMedianUnitValue(tradedata = NA, name = "uvm", other = TRUE)

Arguments

tradedata

Trade data.

name

A string specifying the name of the variable name that will contain the median unit value ("uvm" by default).

other

Logical value indicating whether other median unit values and the number of reporters are reported. By default it is TRUE.

Value

tradedata with median unit value. If other == TRUE intermediate median unit values and the number of partners on which the medians are computed are returned.


SWS-Methodology/faoswsTrade documentation built on Feb. 13, 2023, 1:04 a.m.