Receives a predictor dataframe, a string with the column of the player, a vector of strings with the columns for the predictors and a lookup table and returns an ordered matrix for Stan To be used with the predictors data frame
create_predictor_matrix_with_player_lookup_table(
d,
player,
predictors_columns,
lookup_table
)
a data frame of the predictors
The name of the column of data data contains the player
a vector with strings containing the columns for the predictors
a lookup table data frame
A matrix to be used in stan