powered by
Checks that panel data has required columns and valid structure.
validate_panel_data(panel_data, require_log = TRUE)
TRUE invisibly if valid, otherwise stops with informative error.
Data frame to validate.
Logical. Check for log-transformed columns. Default TRUE.
set.seed(123) panel <- data.frame( year = rep(2000:2002, 3), sector = rep(c("A", "B", "C"), each = 3), log_direct = rnorm(9), log_production = rnorm(9) ) validate_panel_data(panel)
Run the code above in your browser using DataLab