WOULD ANY ONE PLEASE HELP ME WITH THE FOLLOWING PROBLEM?
I just want to take out all the zeros from the data given below (part of
an observation). As you can notice one item is collected from three
outlets (quotations), and it may happen that this item is priced only in
one or two or all the three quotations. Now what I want is, as it is
displayed below I want to extract all the non zero prices without
disturbing the data. Please notice that the structure of the data view
is as depicted below. I want to take out only the zero's, it could be
from only one quotation or two or three conditionally. For example for
the observations in blue color, item green pepper (price of the 9th
month,p9), I want to takeout the 3rd quotation and keep the other two in
order to compute average prices. Similarly, for the item couli flower
since all the quotations are zero, I want to takeout the whole item for
this specific month (p9).
All I want is how to do such things using syntax (SPSS 11).
Actually I have tried to do such things while the observations are
arranged raw wise. By just writing " select if p(?) ne 0" . what if they
are arranged as below? Is there any way to proceed?
Question posted with subject "how to proceed with such things!"
(I've changed the subject line, because it's helpful to have
descriptive subject lines for questions and answers.)
At 11:46 AM 6/23/2006, Nardos Ghebremedhin wrote:
>I want to take out all the zeros from the data given below. As you can
>notice one item is collected from three outlets (quotations), and it
>may happen that this item is priced only in one or two or all the
>three quotations. For example for the observations in blue
>color, item green pepper, (price of the 9th month,p9), I want to
>takeout the 3rd quotation and keep the other two in order to compute
If I understand you, a price of "0.00" actually means that price was
not recorded; and you want to treat those values as absent, for taking
averages and the like.
There are two easy ways:
RECODE p1 TO p12 (0 = SYSMIS).
MISSING VALUES p1 to p12 (0).
I'd be inclined to use MISSING VALUES, since it doesn't change the
data. On the other hand, recoding to system missing makes the missing
values stand out a lot better in LIST output and the Data Editor.