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:

- Three predictors are quantitative variables.
- Four predictors are binary variables.
- 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