calculate_repricing: Calculate repricing index based on hedonic model (geometric...

View source: R/calculate_repricing.R

calculate_repricingR Documentation

Calculate repricing index based on hedonic model (geometric adjustment)

Description

For each pair of subsequent periods, this method compares the observed geometric mean price with the predicted mean price from a hedonic regression model. The ratio of these two values forms the basis of the repricing growth rate, which is then accumulated into an index.

Usage

calculate_repricing(
  dataset,
  period_variable,
  dependent_variable,
  numerical_variables,
  categorical_variables,
  reference_period = NULL,
  number_of_observations = FALSE,
  periods_in_year = 4
)

Arguments

dataset

a data frame containing the data

period_variable

character name of the time period variable

dependent_variable

character name of the dependent variable (e.g., sale price)

numerical_variables

character vector of numeric quality-determining variables

categorical_variables

character vector of categorical variables (including dummies)

reference_period

reference period (numeric or string) to normalize index to 100

number_of_observations

logical, if TRUE, adds number of observations column

periods_in_year

if month, then 12. If quarter, then 4, etc. (default = 4)

Value

a data.frame with columns: period, Index, (optionally number_of_observations)

Author(s)

Vivek Gajadhar, Farley Ishaak


REPS documentation built on March 16, 2026, 5:08 p.m.