Apologies for what is really a simple question. In the following, I have a matrix (regdat) with an ordered categorical outcome in column 1, and x variables in columns 2,3,4. I tried to mimic the example code in the discrete choice documentation for regressing Y on the 3 X variables. The code below results in the error message: G0003 : Indexing a matrix as a vector [dc.src, line 56]
I can trace back to dc.src and see why there's an error, but I don't know how to fix this program. Thanks!
Here's the code:
library dc;
struct dcDesc d1;
d1 = dcDescCreate();
d1.yvar = 1;
d1.xvars = 2|3|4;
struct dcOut dcOut1;
dcOut1 = dcOrderedLogit(regdat,d1,dcControlCreate());
call dcprt(dcOut1);