Programming the statistical procedures from SAS

Proc MI - All observed

Reply
New User
Posts: 1

Proc MI - All observed

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

Ask a Question
Discussion stats
  • 0 replies
  • 146 views
  • 0 likes
  • 1 in conversation