BookmarkSubscribeRSS Feed
H
Pyrite | Level 9 H
Pyrite | Level 9

Hello,

I have run Proc MI, in particular the FCS Discrim for arbitrary missing categorical data. I had one categorical variable with missingness, we will call it X1.  I imputed it and got the  category percentages for X1. I also used the imputes in the BY statement of a Proc Freq and got a chi-sq test statistic, pooled them for the X1 imputes. In the chi-sq test, I compared X1 to another categorical variable (without missingness), we  will call this X2.

My question, is it possible to get the imputed values (percentages) of X1for the X2 variable levels? The program just kicks out the percentages for X1, though I was hoping to see the percentages for X1 at the unique groups of X2. You can see the unique values in the impute, but these are the ungrouped or unpooled versions.

Let me know if I need to clarify anything!

Thanks,

H L

5 REPLIES 5
SteveDenham
Jade | Level 19

I must be missing something here, because I would think that

proc freq;

tables X2*X1;

run;

would give the row, column and cell percentages, from which you could get everything I see in the question.

Steve Denham

H
Pyrite | Level 9 H
Pyrite | Level 9

That would not give me the pooled values for X1 at each level of X2 (since I used the "by impute", it gives me  100 of them). However, you got me to go back and look at the code and a comparable adjustment  did work!! I could insert it further up in the code:

proc surveyfreq data=yourdata_imp;

     tables X1*X2 / row nofreq nototal;

     by _imputation_;

     ods output onway=yourdata_freq;

run;

H
Pyrite | Level 9 H
Pyrite | Level 9

No I take it back that did not work. I did not examine the output carefully enough, it still gave me 100 versions.

I need to figure out a way to keep the X2 variable in the onway dataset or the formula to pool the values!

H
Pyrite | Level 9 H
Pyrite | Level 9

Figure 4 in the attached article makes it seem like the values I am searching for would just be the averages.

So I am looking at the pooled estimates part, but instead of a coefficient, I just have a percentage value.

Sorry, I can ever cut-n-paste on the webpage, the paper is titled:

principled missing data methods for researcher, it is available full text on pubmed.

SteveDenham
Jade | Level 19

I figured I misunderstood.  Do you want the percentage of values that were imputed for X1 for each level of X2?  If so, then create a flag in the imputed dataset for X1_missing, and then do tables X2*flag.

I am afraid I am still missing something here.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1622 views
  • 1 like
  • 2 in conversation