ygk: Geary Khamis quantity index

View source: R/indices.R

ygkR Documentation

Geary Khamis quantity index

Description

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)
ygk(P, Q, min_scale=TRUE)

ErikOSorensen/pppindexr documentation built on Jan. 7, 2023, 4:11 p.m.