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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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