Hi all - I'm working on something where I need to create a variable that the mean of X. For example, I have a variable of a car purchase price for 28k cases (carprice). I want to create variable X that is the mean of the car purchase price variable. I'm trying to get away from "hard" coding the variable, i.e., grabbing the mean from a frequency distribution then doing something like: "compute mean = 3."
In other programs, like stata, estimates of frequency distributions are stored in the background (scalars in stata), then can be used in creating other variables. I've looked at everything I can think of, and just can't find the SPSS analog.
I've tried this too: compute mean = MEAN(carprice). This doesn't generate the mean, it just seems to generate the row average for the variable, not the column average.
Any advice would me amazing.