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.
@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.
Thank you for the response.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.