Programming the statistical procedures from SAS

multinomial ordered logit estimate using proc catmod

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

multinomial ordered logit estimate using proc catmod

Dear all,

I have estimated a multinomial ordered logit using catmod procedure.

 

I am having weird results and I cannot find where my mistake is. For example, for each estimation I don't have any result for likehood ratio. I don't know if I have coded the wrong way my variables or there is something else I am not aware of.

Please find attached photos of my SAS results  

 

Thank you,

Darina Proshenska


Accepted Solutions
Solution
‎05-01-2018 10:57 AM
SAS Employee
Posts: 386

Re: multinomial ordered logit estimate using proc catmod

The ODDSRATIO statement allows only a single variable to be specified. Note that the ODDSRATIO statement is not needed since odds ratios are automatically provided for all variables in the MODEL that are not involved in interactions. The FREQ statement's purpose is described in the LOGISTIC documentation. The FREQ statement is only needed for data which are aggregated. It is not needed for individual level data. See this note about the FREQ (and WEIGHT) statement. 

View solution in original post


All Replies
Super User
Posts: 13,563

Re: multinomial ordered logit estimate using proc catmod

Please show the code you are using. That way you won't get suggestions related to options you already used. Also if you have options that would prevent certain outputs we can tell.

 

For instance, did you use the ML option specified for a response function?

SAS Employee
Posts: 386

Re: multinomial ordered logit estimate using proc catmod

When fitting a logistic model to a categorical response, I strongly recommend that you use PROC LOGISTIC rather than PROC CATMOD regardless of whether your response has two levels or several levels that are ordered (ordinal) or unordered (nominal). LOGISTIC can fit the same model as CATMOD in all these cases, but LOGISTIC is more efficient, easier to use (especially when you want to obtain predicted values), has more options specialized for logistic models (odds ratios, ROC curves, etc.), and offers effect selection methods (forward, backward, stepwise, all subsets).  If your response has several levels (is multinomial), PROC LOGISTIC fits the ordinal model by default. If it is unordered, use the LINK=GLOGIT option in the MODEL statement to fit a generalized logit model as in PROC CATMOD. See the discussion and examples in the LOGISTIC documentation.

 

Concerning your CATMOD results, the likelihood ratio correctly has zero df because the model is saturated. It is saturated because the levels of the predictor define the populations. There are 23 levels or populations and 3 response functions (logits), so there is a total of 69 df and all are used in the model. If what you want is a joint test of all of the model parameters, you will get that if you fit the model in PROC LOGISTIC.

Occasional Contributor
Posts: 8

Re: multinomial ordered logit estimate using proc catmod

Posted in reply to StatDave_sas

Thank you for your response and assistance!

 

I've tried a code example for a cumulative logit model (from the section logistic regression for ordered categories), but I cannot find an explanation for the options proposed and I don't understand the message error on SAS. Would you mind take a look please?

 

This is the message error for the oddsratio line: ERROR 22-322: Syntax error, expecting one of the following: :. / . 

There is also a freq option as FREQ freq ; but I don't understand when I have to create this variable freq and what it is supposed to do.

 

Please find enclosed herewith the sas code.

 

Many thanks,

Darina Proshenska

Solution
‎05-01-2018 10:57 AM
SAS Employee
Posts: 386

Re: multinomial ordered logit estimate using proc catmod

The ODDSRATIO statement allows only a single variable to be specified. Note that the ODDSRATIO statement is not needed since odds ratios are automatically provided for all variables in the MODEL that are not involved in interactions. The FREQ statement's purpose is described in the LOGISTIC documentation. The FREQ statement is only needed for data which are aggregated. It is not needed for individual level data. See this note about the FREQ (and WEIGHT) statement. 

Occasional Contributor
Posts: 8

Re: multinomial ordered logit estimate using proc catmod

Posted in reply to StatDave_sas

Thank you, StatDave_sas,

Now I am having this message error: 

INVALID REFERENCE VALUE FOR EVA (EVA is the last variable in the model).

Do this mean that I need to specify the reference for each variable in the model option?

 

Many thanks,

Darina Proshenska

Occasional Contributor
Posts: 8

Re: multinomial ordered logit estimate using proc catmod

 

I have found my error. I have put all my variables into class option, but it is not possible if they are not with the same reference.

The code works fine now.

 

proc logistic data=MaBib.MaTable plots(only)=oddsratio(range=clip) ;
class EVA (param=ref ref='1') ;
model categoryKarasek2 = EVA
/ covb ;
effectplot / individual polybar ;
title 'Multiple Response Karasek Category Experiment' ;
run ;
ods graphics off ;

 

Many thanks,

Darina Proshenska

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 206 views
  • 2 likes
  • 3 in conversation