I have been getting the following error while trying to run a model for quite some time now.
C:\gauss11\src\maxlikmtutil.src(403) : error G0165 : 'Argument 2, found ??? (19), expected MATRIX ' : Type mismatch or missing arguments
I have never confronted with this error before, and do not have a good idea of what is going wrong. My hunch is I am not using the DS structure to pack the data correctly.
I would highly appreciate if someone helps me to debug the error.
My data is in GAUSS data format and I am using the following code to send and retrieve the data. If needed I would be happy to share the data and the code.
/* Reading input data */ struct DS d0; d0 = dsCreate(); d0.dname = "testnout"; //Where testnout is in Gauss data format /*Code to retrieve the data*/ proc lpr(struct PV p, struct DS d, ind); local dta; dta = d.dataMatrix; local e1, popass, xdel, xgam, v2, d; ... endp; /*Call to maxLikMT*/ struct maxlikmtResults out1; out1 = maxlikmtprt(maxlikmt(&lpr,p0,d0,c0));
Thanks and Regards
The reason you are having this error is that you have two conflicting d variables in your procedure lpr. The first d is the DS structure which is passed in as a parameter. Then inside the function, you declare a local d which is a matrix by default. To resolve your problem you need to rename one of these variables to a different name.