Hi SAS Communities, I tried to use the mean to represent the missing value, but it still showed there were missing value. data elsa02(drop = a _a m); _a = a; do _N_ = 1 by 1 until (last.idauniq | a); set elsa01(rename = drinkd = a); by idauniq ; end; m = mean(_a, a); do _N_ = 1 to _N_; set elsa01(rename = drinkd = a); drinkd = coalesce(a, m); output; end; run; NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 444 at 935:8 NOTE: There were 45648 observations read from the data set WORK.ELSA01. NOTE: There were 45648 observations read from the data set WORK.ELSA01. NOTE: The data set WORK.ELSA02 has 45648 observations and 50 variables. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.01 second
... View more