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.
.
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
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 :
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
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
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
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!
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.