View source: R/building_blocks.R
p_paasche | R Documentation |
The Paasche price index is calculated as
\frac{∑_i p^t_i q^t_t}{∑_i p^b_i q^t_i}.
Arguments can either be vectors or matrices.
p_paasche(pt, pb, qt)
pt |
A n-vector (or m x n matrix) of prices in current period. |
pb |
A n-vector (or m x n matrix) of prices in the baseline period. |
qt |
A n-vector (or n x n matrix) of quantities in the current period. |
Price index between current an baseline period (number or vector).
Pt <- matrix(1:6, ncol = 2) Pb <- Pt*0.7 Qt <- matrix(2:7, ncol = 2) p_paasche(Pt, Pb, Qt) p_paasche(Pt[1,], Pb[1,], Qt[1,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.