Hello All,     I have data like -        PT  Visit1   Visit2  Visit3  Visit4  Visit5    1001  2  .  5  7  11    1002  5  7  .  .  9    1003  .  5  6  11  8    1004  7  7  11  .  .    1005  .  11  8  9  .        I want to use Array to impute the missing value with the average of adjacent non-missing value.     E.g. = for Pt. 1001 - for missing Visit2 I would expect the  average of (Visit1+Visit3)/2   Same for Pt 1002  - for missing Visit3 and Visit 4, I would expect the  average of (Visit2+Visit5)/2 .     In later cases, I dont want imputation as I dont have adjacent values present completely.     Does anyone know how to handle this case in array?     Thanks,  PankP 
						
					
					... View more