Using `reduce_sum` with `ordered_logistic`

Thanks @wds15! I tried this as well. But whatever I do I continue to receive semantic (ill-typed argument) errors.

For instance, when I try compiling the full model by @andrjohns from here, both including and excluding the correction by @bbbales2, I receive a similar error message:

Compiling Stan program...
Semantic error in 'C:/Users/GOEBEL~1.ADM/AppData/Local/Temp/RtmpesbNDK/model-2fbc52fc54f9.stan', line 78, column 12 to line 79, column 49:
   -------------------------------------------------
    76:    }
    77:  
    78:    target += reduce_sum(reduce_func, y, grainsize,
                     ^
    79:                         ii,jj,gg,ystar,thresholds);
    80:  }
   -------------------------------------------------

Ill-typed arguments supplied to function 'reduce_sum'. Available arguments:
(T[], int, int, ...) => real, T[], int, ...
(T[,], int, int, ...) => real, T[,], int, ...
(T[,,], int, int, ...) => real, T[,,], int, ...
(T[,,,], int, int, ...) => real, T[,,,], int, ...
(T[,,,,], int, int, ...) => real, T[,,,,], int, ...
(T[,,,,,], int, int, ...) => real, T[,,,,,], int, ...
(T[,,,,,,], int, int, ...) => real, T[,,,,,,], int, ...
Where T is any one of int, real, vector, row_vector or matrix.
Instead supplied arguments of incompatible type: (int, int, array[] int, array[] int, array[] int, array[] int, matrix, array[,] vector) => real, array[] int, int, array[] int, array[] int, array[] int, matrix, array[,] vectormingw32-make.exe: *** [make/program:47: C:\Users\GOEBEL~1.ADM\AppData\Local\Temp\RtmpesbNDK\model-2fbc52fc54f9.hpp] Error 1
Fehler: An error occured during compilation! See the message above for more information.

I’m starting to wonder whether this is related to my system/stan installation?

1 Like