@kjvander wrote:
Hey Guys, I am very new to this SAS coding stuff. I just have one simple question. I have a variable that has 5 different categories, 0,1,2,3,4. However, for my ANOVA analysis I need the variable to only consist of 1,2,3,4. How would I go about editing my variable to get rid of the 0 and create a new variable with categories 1, 2, 3, 4?
Thanks
If the 0 value actually represents something like "not answered" "not collected" "unavailable" you might be better off setting the value to the SAS missing value. That way the 0 doesn't get used for almost any purpose unless specifically requested.
The missing values excluded from numerical calculations. The mean of 0, 1, 2, 3, 4 would be 2. If you set the 0 to missing then you would have a mean of 2.5.
The concept of missing is fairly important in many places. Do you want the value included in the "n" of any statistic such as mean, standard deviation or even min and max? If the answer to that is "no" then missing is likely what you want.
The modeling procedures will not use any record with missing values for the variables in the model statement generally, so no additional code would have been needed.
... View more