BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
CathyVI
Pyrite | Level 9

Hi,

I wanted to use the TEST statements to test the proportional odds assumption for each of the covariates in my model. I found a similar code and example here: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_examples22.htm

I tired the code on my data but getting multiple errors. Can anyone please explain what am doing wrong.

 

proc logistic data=cleanedpracticum;
class functional person_type Gender hr season
dayofweek drug bac_cat agegrp drg_alc / param=ref order=data ;
model issgrp=functional person_type Gender hr season dayofweek
drug bac_cat agegrp drg_alc / unequalslopes MAXITER=10000;

functional: test functional_0 =functional_1;
person_type: test person_type_0 =person_type_1;
bac_cat: test bac_cat_0 =bac_cat_1;
Gender: test Gender_0 =Gender_1;
hr: test hr_0 =hr_1;
season: test season_0 =season_1;
dayofweek: test dayofweek_0 =dayofweek_1;
agegrp: test agegrp_0 =agegrp_1;
drug: test drug_0 =drug_1;
drg_alc: test drg_alc_0 =drg_alc_1;
agegrp: test agegrp_0 =agegrp_1;
run;
ERROR: FUNCTIONAL_0 in Test Statement functional is not a parameter in the model.
ERROR: FUNCTIONAL_1 in Test Statement functional is not a parameter in the model.
ERROR: PERSON_TYPE_0 in Test Statement person_type is not a parameter in the model.
ERROR: PERSON_TYPE_1 in Test Statement person_type is not a parameter in the model.
ERROR: BAC_CAT_0 in Test Statement bac_cat is not a parameter in the model.
ERROR: BAC_CAT_1 in Test Statement bac_cat is not a parameter in the model.
ERROR: GENDER_0 in Test Statement Gender is not a parameter in the model.
ERROR: GENDER_1 in Test Statement Gender is not a parameter in the model.
ERROR: HR_0 in Test Statement hr is not a parameter in the model.
ERROR: HR_1 in Test Statement hr is not a parameter in the model.
ERROR: SEASON_0 in Test Statement season is not a parameter in the model.
ERROR: SEASON_1 in Test Statement season is not a parameter in the model.
ERROR: DAYOFWEEK_0 in Test Statement dayofweek is not a parameter in the model.
ERROR: DAYOFWEEK_1 in Test Statement dayofweek is not a parameter in the model.
ERROR: AGEGRP_0 in Test Statement agegrp is not a parameter in the model.
ERROR: AGEGRP_1 in Test Statement agegrp is not a parameter in the model.
ERROR: DRUG_0 in Test Statement drug is not a parameter in the model.
ERROR: DRUG_1 in Test Statement drug is not a parameter in the model.
ERROR: DRG_ALC_0 in Test Statement drg_alc is not a parameter in the model.
ERROR: DRG_ALC_1 in Test Statement drg_alc is not a parameter in the model.
ERROR: AGEGRP_0 in Test Statement agegrp is not a parameter in the model.
ERROR: AGEGRP_1 in Test Statement agegrp is not a parameter in the model.
NOTE: The SAS System stopped processing this step because of errors.
1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

You can get all of those tests without entering multiple TEST statements. Just include both the EQUALSLOPES and the UNEQUALSLOPES options as illustrated in this note about the partial proportional odds model. See the "Fitting the fully nonproportional odds model" section. The tests of the U_  effects are the same as what the multiple TEST statements give you. For the documentation example you refer to, these statements give all of the tests.

proc logistic data=docvisit;
   model dvisits= sex age agesq income levyplus freepoor
         freerepa illness actdays hscore chcond1 chcond2 
         / equalslopes unequalslopes;
   run;

View solution in original post

4 REPLIES 4
ballardw
Super User

If your variable is named Functional and the values of the class variable are 1, 2 and 3 then the Test statement wants to see Fuctional1 Functional2 and Functional3 not Functional_1 Functional_2 Functional_3.

From the documentation:

For CLASS variables, the parameter names are obtained by concatenating the corresponding CLASS variable name with the CLASS category;

The _ would only apply if the VALUE of the class (or formatted valued) includes the _.

 

StatDave
SAS Super FREQ

You can get all of those tests without entering multiple TEST statements. Just include both the EQUALSLOPES and the UNEQUALSLOPES options as illustrated in this note about the partial proportional odds model. See the "Fitting the fully nonproportional odds model" section. The tests of the U_  effects are the same as what the multiple TEST statements give you. For the documentation example you refer to, these statements give all of the tests.

proc logistic data=docvisit;
   model dvisits= sex age agesq income levyplus freepoor
         freerepa illness actdays hscore chcond1 chcond2 
         / equalslopes unequalslopes;
   run;
CathyVI
Pyrite | Level 9

@StatDave @ballardw Thank you!

@StatDave 

Could you provide me resources on how to interpret and report my results for the partial proportional odds assumptions. I am struggling to interpret and report my results.

Thank you

StatDave
SAS Super FREQ
The section of the note that I referred to shows an example of obtaining and interpreting the results.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 576 views
  • 2 likes
  • 3 in conversation