validate_input {cbsREPS} | R Documentation |
Validate Input Data for Hedonic Index Calculation
Description
This function checks whether the dataset contains all required variables, whether the dependent and continuous variables are numeric, and whether the period variable is formatted correctly (e.g., "2020Q1", "2020M01"). It ensures that the data is suitable for further processing in hedonic index calculations.
Usage
validate_input(
dataset,
period_variable,
dependent_variable,
continuous_variables,
categorical_variables
)
Arguments
dataset |
A data.frame containing the dataset to be validated. |
period_variable |
A string specifying the name of the period variable column. |
dependent_variable |
A string specifying the name of the dependent variable (usually the sale price). |
continuous_variables |
A character vector with names of numeric quality-determining variables. |
categorical_variables |
A character vector with names of categorical variables (including dummies). |
Value
Returns TRUE invisibly if all checks pass. Otherwise, an error is thrown.
Author(s)
David Pietersz
[Package cbsREPS version 0.1.0 Index]