Hi PFA attached sample data.
I am trying to impute some values (name of output variable 'desired_Imp_val') based on input variable 'Value' .
I need to derive two imputations as below. Please advise.
1.Within a section, If a ID mastered an item and received score of 2 and all items prior to this item have no scores, all prior scores will be imputed as 2 for this visit.
2. If a ID had 3 consecutive 0 scores in a visit and no values for higher number items in this section for this visit, the higher number items will be imputed with score of 0.
Above imputations must be visit and section specific.
Thank you
... View more