View source: R/calculate_repricing.R
| calculate_repricing | R Documentation |
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.
calculate_repricing(
dataset,
period_variable,
dependent_variable,
numerical_variables,
categorical_variables,
reference_period = NULL,
number_of_observations = FALSE,
periods_in_year = 4
)
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) |
a data.frame with columns: period, Index, (optionally number_of_observations)
Vivek Gajadhar, Farley Ishaak
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.