BookmarkSubscribeRSS Feed
henrikib
Calcite | Level 5

Dear all.

 

I am wondering if it is possible to have proc mi to 'skip' subgroups of data with complete data when imputing:


data test_data_1;

  input subgrp resp1 resp2 ;

  cards; 

1 2 2

1 3 3

1 2 .

1 1 3

1 3 2

1 2 1

2 1 2

2 3 3

2 4 2

2 2 1

2 1 3

2 3 2

;

run;

 

proc mi data=test_data_1 nimpute=2;

  by subgrp;

  var resp:;

  monotone regression ;

run;

 

 

 

 

Resulting in:

ERROR: Each observation has analysis variables either all missing or all observed in the data set.

NOTE: The above message was for the following BY group:

      subgrp=2

 

The problem is that for subgrp=2 there are no missing observations, but rather than giving an error I would like the option to just get a note, and have the procedure to just skip that subgrp (and repeat the data).

 

I do realize I can remove that subgroup, and then run the MI on the reduced dataset, and then put the data back in – but I would like to avoid that if at all possible.

 

Br, Henrik

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 0 replies
  • 3016 views
  • 0 likes
  • 1 in conversation