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

Hello,

 

I'm seeking assistance with extracting odds ratios from the "Analysis of GEE Parameter Estimates" table in SAS. Specifically, I need to generate a table that presents each parameter alongside its corresponding log odds estimate, and lower and upper 95% confidence limits, converted into odds ratios.

 

While I'm aware that this could be done using an LS Means statement, I'm looking for an alternative method that could facilitate this process. Perhaps there's a way to utilize proc tabulate or proc report to create this table without manual calculation?

 

Any guidance on this would be greatly appreciated.

 

Thank you

 

Here's an example of the table (proc genmod output) that I would like to retrieve data from.

.Screenshot 2024-04-07 at 11.21.43 PM.png

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

So ... you are fitting GEE model with PROC GENMOD, ... fine to me.

(just be aware there's also a PROC GEE)

 

LSMEANS statement can contain all model effects you are interested in.
The syntax is : 

  • LSMEANS <model-effects> </ options>;

See here for an example:
Home > Analytics > Stat Procs > How to calculate adjusted odds ratios and 95% CIs for GEE using proc genmod?
https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-adjusted-odds-ratios-and-95-C...

If you use "at" - option behind forward slash 

lsmeans A / at means;
lsmeans A / at x1=1.2;
lsmeans A / at (x1 x2)=(1.2 0.3);

, then you need multiple obviously.

 

W.r.t. LSMESTIMATE statement ... Yes, you need one LSMESTIMATE statement per custom hypothesis test among the least squares means.
See here :

Koen

View solution in original post

3 REPLIES 3
sbxkoenk
SAS Super FREQ

Are you using PROC GEE ??

 

I don't think an alternative method would make it easier.

It would make it more "manual" than LSMESTIMATE statement.

It's quite easy to do with :

  • lsmeans statement
  • lsmestimate statement
  • oddsratio statement (maybe not available in PROC GEE)

Usage Note 42728: Producing odds ratios for logistic models in the GENMOD or GEE procedure
https://support.sas.com/kb/42/728.html

 

Usage Note 41516: Testing hypotheses and estimating odds ratios within and across specific logits in LINK=GLOGIT models
https://support.sas.com/kb/41/516.html

(The above usage note also applies when fitting the generalized logit model to repeated measures data using PROC GEE)

 

Koen

varatt90
Obsidian | Level 7

Thank you for your response.

 

I'm using the Proc Genmod procedure.

 

Please correct me if I'm wrong but the LSMeans and LSMestimate need to be written for each parameter, correct? Is there a way to do this for all parameter included in the model without writing a LSMeans line for each parameter of interest?

 

Also, is there a resource you have discusses the placement of the values "1 -1 0" etc. for when you're working with a categorical variable that has more than two groups? 

 

Thank you

 

 

 

 

sbxkoenk
SAS Super FREQ

So ... you are fitting GEE model with PROC GENMOD, ... fine to me.

(just be aware there's also a PROC GEE)

 

LSMEANS statement can contain all model effects you are interested in.
The syntax is : 

  • LSMEANS <model-effects> </ options>;

See here for an example:
Home > Analytics > Stat Procs > How to calculate adjusted odds ratios and 95% CIs for GEE using proc genmod?
https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-adjusted-odds-ratios-and-95-C...

If you use "at" - option behind forward slash 

lsmeans A / at means;
lsmeans A / at x1=1.2;
lsmeans A / at (x1 x2)=(1.2 0.3);

, then you need multiple obviously.

 

W.r.t. LSMESTIMATE statement ... Yes, you need one LSMESTIMATE statement per custom hypothesis test among the least squares means.
See here :

Koen

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 784 views
  • 0 likes
  • 2 in conversation