BookmarkSubscribeRSS Feed
cdriesse139
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;
run;


*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;
run;

 

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;
run;


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;
run;

 

 

 

2 REPLIES 2
ballardw
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.

cdriesse139
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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 544 views
  • 0 likes
  • 2 in conversation