Issues with running spatial survival model in Stan

Hi all,
I am trying to run a spatial survival model with 10 predictors in Stan. So the type of my predictor variables are as follows:

  1. Three predictors are quantitative variables.
  2. Four predictors are binary variables.
  3. Three predictors are categorical variables with 4 levels.

Can someone help me in defining categorical variables, please?
Thank you!

My Stan codes for data and parameter blocks:
"
data {
int <lower=0> province;
int <lower=0> n_grid;
int <lower=0> N;
int <lower=0> num;
int <lower=0> number;
vector <lower=0> [province] p;
matrix [province,n_grid] kernel;
matrix [N,num] predictor;
matrix [N,number] respon;
}
parameters{
vector [num] beta;
real <lower=0> sigma;
vector [n_grid] x;
}
transformed parameters{
vector [N] lambdaa;
for(n in 1:N) {
lambdaa [n] = exp (predictor [n]*beta);
}
}
"
Best,

Eisa

Is this the same model as Issues with defining the custom likelihoods of spatial survival model in Stan - #4 by martinmodrak ?

In any case, categorical predictors are most often encoded as a set of binary variables via “dummy coding” (Dummy variable (statistics) - Wikiversity) or “effect coding” (FAQ: What is effect coding?)

Thank you for your information and help.