fp: Calculate fixed price series

View source: R/fp.R

fpR Documentation

Calculate fixed price series

Description

For a yearly data calculates a serie in fixed prices at base years price level for series in current prices and previous year's prices.

Usage

fp(cp, pp, time, year)

Arguments

cp

a current price variable.

pp

a previous year price variable.

time

a variable for years.

year

a numeric for a base year.

Value

an vector.

Examples

fp(cp = c(1, 2, 3), pp = c(NA, NA, NA), time = c(2014,2015,2016), year = 2015)
fp(cp = c(1, 2, 3), pp = c(1, 2, 4), time = c(2014,2015,2016), year = 2015)
fp(cp = c(1, 2, 3), pp = c(NA, 2, 4), time = c(2014,2015,2016), year = 2015)
fp(cp = c(NA, 2, 3), pp = c(NA, NA, 4), time = c(2014,2015,2016), year = 2015)


pttry/statfitools documentation built on Feb. 2, 2025, 1:50 a.m.