Skip to contents

Converts nominal monetary values to real (constant-price) values using Malawi CPI data. By default uses 2019 (IHS5 baseline) as the reference period.

Usage

ihs_deflate(data, value_cols, round = NULL, base_year = 2019)

Arguments

data

A data.frame.

value_cols

Character vector of column names containing monetary values to deflate.

round

Character string of the IHS round (e.g., "IHS5"). If NULL (default), auto-detected from an ihs_round column in the data.

base_year

Numeric. The base year for deflation. Default is 2019 (IHS5 baseline).

Value

A data.frame with new *_real suffixed columns containing deflated values.

Examples

if (FALSE) { # \dontrun{
  # Deflate IHS4 consumption to 2019 prices
  real_data <- ihs_deflate(df, value_cols = "rexp_cat01", round = "IHS4")
} # }