BookmarkSubscribeRSS Feed
mitrakos
Obsidian | Level 7

Hello everyone,

 

I have survey data of approximately 5000 participants and I am currently looking to model the outcome of a dichotomized response variable to a predictor. Our question is if there is a trend of participants being more likely to be in the 1 level of the response variable as we move from 4 to 1 in the ordinal response predictor. 

 

The dichotomized response has levels 1 and 0 while the predictor is an ordinal survey response with levels 1 - "Yes - completely", 2 - "Yes - mostly",  3 - "Yes - somewhat", and 4 - "No".  I am currently wondering how to structure my proc logistic code and also weighing the use of proc logistic vs. proc surveylogistic. I do not have survey weights, so it seems that proc surveylogistic would not be useful in comparison to proc logisitic. 

 

Here is my code so far: 

 

proc logistic data = import plots=all;
class outcome q1 / param=ordinal;
model outcome = q1;
run;

I chose ordinal for the param= statement however I am not sure about that, though changing the param= option does not change the model fit statistics. 

 

I will continue to read documentation about proc logistic to see what other options might suit, but if there are any suggestions please let me know. Thank you!

5 REPLIES 5
Reeza
Super User
I would review the ordinal method of parmeterization . I don't think it's valid for your questions, given the type of answers and the differentiation between No and somewhat/mostly/completely.
And because it accumulates them, which may not be in the order you want, so you'll need to review the order of the parameters as well (I suspect it's inverse of what you want).

I think using REF would allow you the most flexibility in combination with ESTIMATE/LSMEANS/ODDSRATIO statements to test various hypothesis
mitrakos
Obsidian | Level 7
Thank you! I will review the parameterization. I cannot use LSMEANS unless I set the parameter to glm so I will explore using that vs. reference, as well as the other options.
Reeza
Super User
PS. I moved this to Statistics Forum
StatDave
SAS Super FREQ

Assuming your data was from a random sample, it is easiest to avoid a modeling approach and use the Cochran-Armitage trend test available in PROC FREQ. You can also use a modeling approach with PROC LOGISTIC, but if the table is sparse this can make it difficult to successfully fit the model. When you use PROC LOGISTIC, you should not specify the response variable in the CLASS statement. If your predictor variable is ordinal, you should create a numeric variable with appropriate numeric values for its levels and use it only in the MODEL statement, not in the CLASS statement. The following shows both analyses assuming a numeric predictor Q1NUM. The trend test is the test of the Q1NUM parameter in the PROC LOGISTIC results. The tests from PROC FREQ and PROC LOGISTIC should not be expected to be the same as they are entirely different types of tests. For more information on the C-A trend test in PROC FREQ, see the "Details: Statistical Computations: Cochran-Armitage Test for Trend."

proc freq data=import; 
table q1num*outcome/trend;
run;
proc logistic data=import;
model outcome(event='1')=q1num;
run;

Note that if your data was collected using a complex survey involving clustering or stratified sampling, you should not use PROC LOGISTIC or PROC FREQ - you should use PROC SURVEYLOGISTIC or PROC SURVEYFREQ.

mitrakos
Obsidian | Level 7
Thank you for the reply! I hadn't heard of the Cochran-Armitage test so I will look into that. Currently there is no clustering or stratified sampling, however we do collect demographics so if that becomes the case I will be sure to look into SURVEYLOGISTIC and SURVEYFREQ.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 5 replies
  • 786 views
  • 3 likes
  • 3 in conversation