Calculates per-level mean of predicted value vs actual value for a given variable.
Calculates per-level mean of predicted value vs actual value for a given variable.
In the basic setting, this function is equivalent to doing group-by on variable and calculating mean on predicted and actual. In addition to that it also handles NAs in response and weights automatically.