BookmarkSubscribeRSS Feed
superbibi
Obsidian | Level 7

Hi SAS Users,

 

I have a longitudinal data set with non-monotone missing pattern. 

 

Missing Data PatternsGroup base_value diff_value3 diff_value4 Freq Percent Group Meansbase_value diff_value3 diff_value41234

XXX3587.5073.460000-42.422857-24.960000
XX.12.5079.100000-34.100000.
X.X25.0078.600000.-32.650000
X..25.0076.450000..

 

 

proc mi data = visit3_4 out = visit3_4_mi nimpute = 20 seed =3542;
class grouping;
fcs;
var base_value diff_value3 diff_value4 ;
mnar 
model (diff_value3/modelobs = (grouping = "Group A"))
model (diff_value4/modelobs = (grouping = "Group A"))
;
run;

 

I am not sure my code is correct or not. 

 

Thank you.

 

2 REPLIES 2
ballardw
Super User

@superbibi wrote:

Hi SAS Users,

 

I have a longitudinal data set with non-monotone missing pattern. 

 

Missing Data PatternsGroup base_value diff_value3 diff_value4 Freq Percent Group Meansbase_value diff_value3 diff_value41234

X X X 35 87.50 73.460000 -42.422857 -24.960000
X X . 1 2.50 79.100000 -34.100000 .
X . X 2 5.00 78.600000 . -32.650000
X . . 2 5.00 76.450000 . .

 

 

proc mi data = visit3_4 out = visit3_4_mi nimpute = 20 seed =3542;
class grouping;
fcs;
var base_value diff_value3 diff_value4 ;
mnar 
model (diff_value3/modelobs = (grouping = "Group A"))
model (diff_value4/modelobs = (grouping = "Group A"))
;
run;

 

I am not sure my code is correct or not. 

 

Thank you.

 


One of the approaches I use for testing whether code like this is close to working is to take a data set that is not missing values, create a copy and delete some of the values. Test the code against that data set and see if the imputed values look "reasonable", where reasonable would depend on what the actual input data looks like.

superbibi
Obsidian | Level 7

Thank you for the response.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1011 views
  • 0 likes
  • 2 in conversation