BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
superbibi
Obsidian | Level 7

Hi SAS users,

 

My current code only shows the adjust p-values with vis = 30 as the reference group. If I want to use vis = 20 as the reference group, how should I modify the code?

 

PROC SORT DATA = test ;
BY VIS;
RUN;

PROC GENMOD DATA = test;
CLASS VAL  SUBNUM VIS (REF = "20" )  ;
MODEL VAL =  VIS/DIST = BIN ;
REPEATED SUBJECT = SUBNUM/CORR = UNSTR CORRW;
LSMEANS VIS/PDIFF ADJUST = DUNNETT;
RUN; 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @superbibi,

 

I think the result from

LSMEANS VIS/PDIFF=control('20') ADJUST = DUNNETT;

looks promising (cf. documentation of the PDIFF option).

View solution in original post

4 REPLIES 4
FreelanceReinh
Jade | Level 19

Hi @superbibi,

 

I think the result from

LSMEANS VIS/PDIFF=control('20') ADJUST = DUNNETT;

looks promising (cf. documentation of the PDIFF option).

superbibi
Obsidian | Level 7
Thank you very much! It works.
superbibi
Obsidian | Level 7

Is there a way to calculate the overall p-value for vis using proc genmod?  In the attached code, I got only the p-values for each paired comparison.

FreelanceReinh
Jade | Level 19

Do you mean the Wald chi-square test?

  Wald Statistics For Type 3 GEE Analysis

                          Chi-
Source           DF     Square    Pr > ChiSq

VIS               7      37.94        <.0001

To obtain this, you need to add the TYPE3 and WALD options to the MODEL statement:

MODEL VAL =  VIS/DIST = BIN type3 wald;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1913 views
  • 2 likes
  • 2 in conversation