Function to calculate deciles using PC model

PC_model(
  df,
  grouping_variables = c("country", "year"),
  value_col = "Income..net.",
  id_col = c("country")
)

Arguments

df

dataframe with all IV data. These are output by `compile_IV_data()`.

grouping_variables

variables to group by

value_col

Name of values to be output.

id_col

column to split by for parallelization