repalce na with mean per group code example Example: repalce na with mean per group impute_lm(df, rating ~ 1 | id)