Hi everyone, I am trying to build a model and I’m getting the error:
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
No matches for:
vector[] + vector[]
Available argument signatures for operator+:
int + int
real + real
vector + vector
row vector + row vector
matrix + matrix
vector + real
row vector + real
matrix + real
real + vector
real + row vector
real + matrix
+int
+real
+vector
+row vector
+matrix
expression is ill formed
error in ‘model_model_nb_baseline_seasons’ at line 46, column 74
44:
45: // getting mu in log form
46: log_mu_home = home_att[season, home_team] + away_def[season, away_team];
^
47: log_mu_away = away_att[season, away_team] + home_def[season, home_team];
Error in stanc(model_code = paste(program, collapse = “\n”), model_name = model_cppname, :
failed to parse Stan model ‘model_nb_baseline_seasons’ due to the above error.
Has anyone encountered this problem and know a potential solution to this?
Thanks,
Ryan