BookmarkSubscribeRSS Feed
lshandl
Calcite | Level 5

Hello,

 

I am doing a Poisson regression using multiply imputed data to try to get a pooled estimate across my imputed datasets. I was told that the easiest way is to probably use PROC PLM coding. I need to combine doing PROC PLM with then doing mianalyze to account for the 5 imputed datasets.

 

I have seen this thread: https://communities.sas.com/t5/Statistical-Procedures/How-to-get-pooled-results-for-PROC-PLM-on-impu...

 

and it seems close to what I want to do, but I cannot get the code to run corrects.


proc genmod data = cancer.cancer_mi;
class  cryo_reason_num / descending;
model oocytes_retrieved = cryo_reason_num / dist = poisson link = log;
by _imputation_;
where CycleCancelled = "N";
ods output ParameterEstimates = est;
store stored_model;
run;

proc plm source = stored_model;
show parameters;
run;

proc plm source = stored_model;
lsmeans cryo_reason_num / ilink cl;
run;

 

The above code gives me 5 separate datasets (one for each imputation) that all look like exactly what I want to get one estimate for.

 

Below is the part giving me trouble from the link posted above:

 

proc plm restore = stored_model;
class cryo_reason_num;
estimate 'Cancer' cryo_reason_num 1 / category=separate;
estimate 'Other Infertile' cryo_reason_num 2/ category=separate;
estimate 'Other Medicale' cryo_reason_num 3 / category=separate;
ods output Estimates=est_ds;
run;
proc sort data=est_ds;
by cryo_reason_num;
run;

proc mianalyze data=est_ds;
by cryo_reason_num;
modeleffects estimate;
stderr stderr;
run;

 

 

 

I would appreciate any help!

1 REPLY 1
ballardw
Super User

"Giving me trouble" is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the forum's icon {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

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!

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
  • 1 reply
  • 541 views
  • 0 likes
  • 2 in conversation