Skip to contents

Paasche quantity index.

Usage

q_paasche(pt, qt, qb)

Arguments

pt

A n-vector (or m x n matrix) of prices in current period.

qt

A n-vector (or m x n matrix) of quantities in the current period.

qb

A n-vector (or m x n matrix) of quantities in the baseline period.

Value

Quantity index between current an baseline period (number or vector).

Examples

Pt <- matrix(1:6, ncol = 2)
Qt <- matrix(2:7, ncol = 2)
Qb <- Qt*1.2
q_paasche(Pt, Qt, Qb)
#> [1] 0.8333333 0.8333333 0.8333333
q_paasche(Pt[1,], Qt[1,], Qb[1,])
#> [1] 0.8333333