-1

I have imputed data using multiple imputation using PROC MI in SAS, generating n imputed datasets. Now, I would like to report a baseline table with imputed values. However, I cannot find the right SAS code to do so. I've used PROC FREQ using a BY _ imputation _ statement, to get n baseline tables. I want to combine these n tables into just one, with pooled frequencies for every category of the covariates.

Apparently this is fairly easy in SPSS but not in SAS. I found some topics suggesting PROC MIANALYZE, which might be a solution, but the examples I found only considered estimates in for example regression models. Does someone have a suggestion on how to combine the frequencies from n imputed datasets into one pooled baseline table?

Many thanks!

Lisa
  • 1
  • 1
    Show the code you are submitting and example of desired result table. Show sample data that reproduces the problem. You might want to look into using `Proc REPORT` and `columns category_var _imputation_ ...; define _imputation_ / group; define category_var / group;` – Richard Oct 21 '20 at 15:04

1 Answers1

0

I find a possible way for you from SAS Forum: https://communities.sas.com/t5/Statistical-Procedures/proc-freq-with-multiple-imputation/td-p/671680

As it says, proc mianalysze require point estimation and standard error of n times imputations, but proc freq doesn't compute it. So you need to use proc surveyfreq. Then, just programing like ususal:

proc minanlysze data = MyData;
  modeleffcts Percent;
  stdder stddev;
run;
whymath
  • 1,262
  • 9
  • 16
  • Thank you for your reply. I found some PROC SURVEYFREQ code earlier on in my search but somehow the code did not work then. But I tried the code again and now it works! I realized that another solution could be applied as well: the weighted frequencies of PROC MIANALYZE are the same as when performing PROC UNIVARIATE and dividing the frequency counts by the n imputations. – Lisa Oct 21 '20 at 17:18