Hi,
I would like to have a functionality similar to ave in base R to create a grouped mean variable. I have a dataset with a continuous variable x and group. Now I want to create a new variable where all observations in a particular group have the same mean. How to do?
creating grouped mean variable
Re: creating grouped mean variable
you can achieve this with computer/transformed variables:
x - VMEAN(x, group_by=group)
jonathon
x - VMEAN(x, group_by=group)
jonathon