Skip to contents

This is a convenience function, which returns only the quantity index vector. Calls gk and returns only the index.

Usage

ygk(P, Q, pop = NULL, min_scale = FALSE)

Arguments

P

An m x n matrix (or dataframe) of prices (row country, column goods).

Q

An m x n matrix (or dataframe) of quantities (row country, column goods).

pop

Optional m-vector of population numbers (if Q is per capita).

min_scale

Should real income be scaled in units relative to least income country?

Value

An m-vector of quantities.

Examples

P <- matrix(1:6, ncol = 2)
Q <- matrix(2:7, ncol = 2)
ygk(P, Q)
#> [1] 5.810333 7.215500 8.620666
ygk(P, Q, min_scale=TRUE)
#> [1] 1.000000 1.241839 1.483678