Hi @ctucker, welcome to the forum.
I ca’t run your code without the dataset, so I don’t know the exact reason. But your code seems to pass u0 as a vector of matrices? Optim assumes that the input x is a single vector.
Hi @ctucker, welcome to the forum.
I ca’t run your code without the dataset, so I don’t know the exact reason. But your code seems to pass u0 as a vector of matrices? Optim assumes that the input x is a single vector.