View source: R/f_bilateral_indices.R
tindex | R Documentation |
This function calculates the theoretical value of the unweighted price index for lognormally distributed prices.
tindex(pmi = c(), psigma = c(), start, ratio = TRUE)
pmi |
A numeric vector indicating |
psigma |
A numeric vector indicating |
start |
The first period in the generated data frame (as character) limited to the year and month, e.g. '2019-12'. |
ratio |
A logical parameter indicating how we define the theoretical unweighted price index. If it is set to TRUE, then the resulting value is a ratio of expected price values from compared months; otherwise the resulting value is the expected value of the ratio of prices from compared months. |
This function calculates the theoretical value of the unweighted price index for lognormally distributed prices (the month defined by start
parameter plays a role of the fixed base period). The characteristics for these lognormal distributions are set by pmi
and sigma
parameters. The ratio
parameter allows to control the definition of resulting theoretical price index values. The function provides a data frame consisting of dates and corresponding expected values of the theoretical unweighted price index. The generated dataset is ready for further price index calculations.
tindex(pmi=c(1,1.2,1.3),psigma=c(0.1,0.2,0.15),start="2020-01")
tindex(pmi=c(1,1.2,1.3),psigma=c(0.1,0.2,0.15),start="2020-01",ratio=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.