08-05-2015 01:15 PM
I would like to set a reference value to some independant variables in a mixed logit regression using PROC MDC.
Thus, I tried to use the class statement the same way as in the PROC LOGISTIC:
class x1(ref='1') /param=ref;
However, the error 22-322 appears, saying:
"Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_."
What's wrong? Is it allow to specify a reference value with proc MDC? Note that the class statement used without specifying a reference value works fine.
08-05-2015 03:52 PM
If you don't specify a reference value, which level of the class variable is used by default? If it is last or first, create a variable that will sort to that position, and sort the data prior to analysis. This is what we had to do before you could specify a reference level in the class statement, and it appears that is the case for this instance of the CLASS statement. Implementation of the CLASS statement in SAS/ETS procedures is not as cohesive as it is in SAS/STAT procedures--only COUNTREG and SEVERITY allow for the specification of reference levels.
08-05-2015 05:14 PM
Good idea. However, after some tests, I think there is a problem with the class statement using proc MDC (type=mixedlogit). In the results, there is a parameter for the reference value, which is a non-sense. Moreover, this parameter has no standard error. I really don't get why.
I think I'll just create dummy variables.
08-11-2015 07:59 AM
Use of the CLASS statement, and the results from the solution vector are often confusing. If the parameterization is a full rank parameterization, then there will be estimate values for all levels presented, but at least one will not be included. If the parameterization is non-full rank (GLM type), then one level will have a zero estimate, without a standard error.
Can you share the output?
08-11-2015 10:29 AM
Thanks. I cannot share the output because I work in a secure lab. The version of SAS I use at home doesn't support the class statement in proc MDC, si I can't reproduce. The syntax is basic, such as:
Suppose variable "a" has 3 categories.
model y = a b c/
type=mixedlogit nchoice=10 mixed=(normalparm=a);
I'm not very familiar with concepts such as full rank parameterization.
08-11-2015 01:38 PM
I think you need to open a ticket with Tech Services where you can present the exact output in a confidential setting. I have tried three different datasets and cannot produce an error in the output starting with the example data and code for PROC MDC.
08-12-2015 09:04 AM
That's the same answer I gave several days ago. For reference, here is the cross-post: https://communities.sas.com/thread/86212