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!