I’m currently using ode_bdf_tol
, which returns an array of T
vectors, each of size N
, where T
is the number of timepoints and N
the number of state variables. My data is a sum of a subset of the states, so I would like to do something like the following:
data {
real x[T];
}
transformed_data {
vector[N] w = [0, 0, 0, 1, 1, ..., 1]'; // select states to sum
}
model {
vector[N] sol[T];
sol[1:T] = ode_bdf_tol(...); // an array of vectors
to_matrix(sol[1:T]) * w // I want to do something like this
}
Conceptually, I’d like to ‘stack’ the array of vectors from ode_bdf_tol
's output into a T x N
matrix, which would enable the above and other vector/matrix operations. Is this something that’s currently supported?
Thanks!