Skip to contents

This is a convenience function, which returns just the world price vector. Calls gk and returns only the prices.

Usage

pgk(P, Q, pop = NULL)

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).

Value

An n-vector of prices.

Examples

P <- matrix(1:6, ncol = 2)
Q <- matrix(2:7, ncol = 2)
pgk(P, Q)
#> [1] 0.4051666 1.0000000