BookmarkSubscribeRSS Feed
Calcite | Level 5

Hello you all,

I have been trying to impute missing data using the delta adjusted pattern imputation to compare it to the control-based pattern imputation. 


Unfortunately I am getting the above error message which I am unable to solve. Could somebody advice?

My syntax is as follows:

proc mi data=milk.missingwide out=milk.FNDSdimp seed=128 nimpute=1000;
class sex single precovid randomization;
FCS discrim(sex/details) discrim(single/details) reg(FNDSbase/details) reg(FNDS1/details) reg(FNDS2/details) reg(FNDS3/details) reg(FNDS4/details);
mnar model(FNDSbase / modelobs= (randomization='0'))
adjust (FNDS1/ shift=1 adjustobs=(randomization='1'))
adjust (FNDS2/ shift=1 adjustobs=(randomization='1'))
adjust (FNDS3/ shift=1 adjustobs= (randomization='1'))
adjust (FNDS4/ shift=1 adjustobs= (randomization='1'));
var sex single precovid FNDSbase FNDS1 FNDS2 FNDS3 FNDS4;

*reverting back to long dataset type;
data milk.FNDSdimplong;
set milk.FNDSdimp;
week=1; FNDS=FNDS1; output;
week=2; FNDS=FNDS2; output;
week=3; FNDS=FNDS3;output;
week=4; FNDS=FNDS4; output;


proc mixed data=milk.FNDSdimplong;
class subj randomization sex single week precovid;
model FNDS = randomization|week FNDSbase sex single precovid /ddfm=kr2 solution covb;
repeated week / subject=subj(randomization) type=AR(1) ;
rANDOM subj(randomization);
by _imputation_;
lsmeans randomization*week /pdiff cl;
ods output SolutionF=milk.mxFNDSdparms covb=milk.mxFNDSdcovb;

proc mianalyze parms(classvar=full)=milk.mxFNDSdparms covb(effectvar=rowcol)=milk.mxFNDSdcovb;
class randomization week sex single precovid;
modeleffects randomization week randomization*week FNDSbase sex single precovid;




Super User

We generally recommend including the code and and all the messages from the LOG when discussing errors so we can see exactly where SAS reported something and possibly other relevant information.


I this case look at your data for _IMPUTATION_=868 in data=milk.FNDSdimplong.

I suspect you will find something odd about the set of model variables for those observations.

Calcite | Level 5
Thank you for your advice. Taking a closer look at the log indeed provided an answer to the question. While the covariance matrix that was the best fit for the non-imputed data, this covariance matrix was no longer the best fit when missing data was imputed.
Always good to see it with a fresh pair of eyes.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2 in conversation