HELLO! 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? All the best! Itemno itemname quotation unit p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 03002 Cabbage 1 KG. 3.00 3.00 2.50 2.00 2.00 1.50 2.00 2.00 4.00 3.00 4.00 4.00 03002 Cabbage 2 KG. 2.00 2.50 2.00 3.00 2.00 3.00 3.00 2.00 3.50 4.00 4.00 4.00 03002 Cabbage 3 KG. 3.00 2.00 2.00 2.00 2.00 1.50 1.50 1.50 3.00 2.50 4.00 3.00 03003 Lettuce 1 KG. 4.50 4.00 5.00 3.00 4.00 6.00 7.00 8.00 8.00 8.00 7.00 5.00 03003 Lettuce 2 KG. 5.00 5.00 5.00 4.00 5.00 8.00 8.00 8.00 8.00 8.00 8.00 6.00 03003 Lettuce 3 KG. 5.00 4.00 5.00 5.00 4.00 6.00 6.50 7.00 7.00 7.00 8.00 5.00 03004 Carrot 1 KG. 5.00 6.00 6.00 4.00 4.00 5.00 5.00 5.00 10.00 6.00 7.00 6.00 03004 Carrot 2 KG. 5.00 5.00 5.00 4.00 5.00 5.00 6.00 6.00 10.00 8.00 7.00 6.00 03004 Carrot 3 KG. 6.00 5.00 5.00 5.00 4.00 4.50 4.50 5.00 10.00 6.00 6.00 5.00 03005 Potatos 1 KG. 5.00 5.00 7.00 5.00 6.00 7.00 7.50 7.00 7.00 5.00 4.00 8.00 03005 Potatos 2 KG. 5.00 5.00 7.00 6.00 7.00 7.00 7.50 8.00 7.00 5.00 6.00 6.00 03005 Potatos 3 KG. 5.00 5.00 7.00 5.00 6.00 7.00 7.00 8.50 7.00 3.50 5.00 6.00 03006 Tomatos 1 KG. 6.00 4.00 3.50 3.50 5.00 5.50 7.00 8.00 10.00 6.00 3.00 3.50 03006 Tomatos 2 KG. 6.00 4.00 3.50 3.50 6.50 7.00 7.00 9.00 10.00 5.50 3.00 3.00 03006 Tomatos 3 KG. 6.00 4.50 3.50 4.00 6.00 4.00 5.00 8.00 10.00 6.00 3.00 3.00 03007 Onions 1 KG. 7.50 6.00 4.00 3.50 4.00 4.50 5.00 4.00 6.00 6.00 7.00 6.00 03007 Onions 2 KG. 7.00 9.00 4.00 4.00 4.00 4.50 5.00 4.00 6.00 6.00 8.00 7.00 03007 Onions 3 KG. 7.00 6.00 4.50 4.50 4.00 3.50 4.00 5.50 7.00 5.50 8.00 6.00 03008 Garlic 1 KG. 30.00 40.00 30.00 15.00 20.00 20.00 40.00 35.00 40.00 40.00 25.00 30.00 03008 Garlic 2 KG. 30.00 25.00 25.00 20.00 20.00 20.00 30.00 35.00 30.00 22.00 30.00 40.00 03008 Garlic 3 KG. 30.00 30.00 25.00 25.00 20.00 12.00 30.00 32.00 40.00 24.00 30.00 28.00 03009 Pepper green 1 KG. 10.00 10.00 7.00 7.00 .00 10.00 10.00 8.00 12.00 12.00 10.00 14.00 03009 Pepper green 2 KG. 7.00 8.00 6.00 10.00 .00 11.00 12.00 9.00 10.00 12.00 14.00 10.00 03009 Pepper green 3 KG. 10.00 5.00 6.00 8.00 12.00 10.00 10.00 12.00 .00 11.00 .00 13.00 03011 Couli flower 1 KG. 8.00 15.00 10.00 8.00 .00 10.00 13.00 14.00 .00 .00 16.00 10.00 03011 Couli flower 2 KG. 8.00 10.00 8.00 7.00 10.00 .00 12.00 12.00 .00 .00 15.00 10.00 03011 Couli flower 3 KG. 6.00 10.00 5.00 7.00 8.00 .00 .00 .00 .00 .00 .00 .00 03012 Pumpkin 1 KG. 5.00 5.00 4.00 3.00 4.00 6.00 4.00 5.00 4.50 2.50 4.00 4.00 03012 Pumpkin 2 KG. 5.00 4.00 4.00 2.50 3.00 5.00 4.00 5.00 4.50 2.50 5.00 4.00 03012 Pumpkin 3 KG. 5.00 3.54 5.00 3.00 3.00 4.00 3.50 4.60 4.50 2.30 5.00 3.50 03013 Zukini 1 KG. 5.00 6.00 7.00 8.00 5.00 5.00 5.00 6.00 12.00 7.00 7.00 7.00 03013 Zukini 2 KG. 5.00 6.00 7.00 8.00 5.00 5.00 6.00 6.00 10.00 8.00 10.00 8.00 03013 Zukini 3 KG. 7.00 6.00 7.00 8.00 5.00 5.00 5.00 6.00 11.00 6.00 8.00 6.00 03017 Spinach 1 KG. 6.00 6.00 8.00 7.00 3.00 6.00 .00 .00 10.00 10.00 10.00 5.00 03017 Spinach 2 KG. 7.00 5.50 7.50 6.00 4.00 6.00 6.00 .00 8.00 .00 10.00 6.00 03017 Spinach 3 KG. 6.00 7.00 8.00 6.00 4.00 .00 .00 .00 8.00 .00 .00 .00 03018 Chikoria 1 KG. 4.00 5.00 5.00 4.00 .00 4.00 .00 .00 4.00 5.00 4.00 3.00 03018 Chikoria 2 KG. 4.00 3.50 4.00 4.00 .00 4.00 4.00 .00 6.00 5.00 5.00 5.00 03018 Chikoria 3 KG. 5.00 6.00 4.00 4.00 4.00 .00 .00 .00 .00 .00 5.00 3.00 03019 Cabbage 1 KG. 4.00 3.00 2.00 2.00 1.50 2.00 2.00 2.60 4.00 5.00 4.00 4.00 03019 Cabbage 2 KG. 3.00 3.00 3.00 2.00 2.00 2.50 2.00 2.50 3.50 5.00 4.00 4.00 03019 Cabbage 3 KG. 4.00 1.50 2.00 2.00 2.00 2.00 2.50 3.50 4.00 4.50 5.00 3.00 03020 Bamia 1 KG. 10.00 10.00 12.00 13.00 13.00 14.00 .00 20.00 12.00 10.00 12.00 .00 03020 Bamia 2 KG. 10.00 9.00 10.00 12.00 14.00 13.00 .00 15.00 12.00 12.00 12.00 10.00 03020 Bamia 3 KG. 10.00 10.00 10.00 13.00 13.00 .00 .00 .00 10.00 .00 12.00 16.00 04001 Bananas 1 KG. 4.00 4.00 4.00 3.50 4.00 3.50 3.50 3.50 4.50 4.00 4.00 5.00 04001 Bananas 2 KG. 4.00 3.80 4.00 3.50 3.00 3.50 3.50 4.00 4.00 4.00 4.50 4.50 04001 Bananas 3 KG. 4.00 4.00 4.00 3.50 3.50 3.50 3.50 4.00 4.00 4.00 4.50 4.50 04002 Oranges 1 KG. 8.00 9.00 11.00 11.00 11.00 13.00 14.00 12.00 13.00 12.00 10.00 9.00 04002 Oranges 2 KG. 8.00 9.50 11.00 12.00 12.00 14.00 13.00 14.00 12.00 12.00 10.00 9.00 04002 Oranges 3 KG. 8.00 9.00 11.00 12.00 12.00 13.00 12.00 13.00 12.00 11.00 8.00 9.00 04003 Lemons 1 KG. 10.00 10.00 15.00 14.00 .00 19.00 15.00 15.00 14.00 14.00 12.00 12.00 04003 Lemons 2 KG. 10.00 10.00 15.00 12.00 .00 20.00 18.00 12.00 12.00 13.00 15.00 12.00 04003 Lemons 3 KG. 15.00 10.00 8.00 13.00 16.00 20.00 16.00 13.00 12.00 12.00 13.00 12.00 04005 Papayas 1 KG. 7.00 8.00 7.00 4.50 6.00 6.00 6.00 8.00 11.00 11.00 12.00 10.00 04005 Papayas 2 KG. 7.00 6.50 6.00 6.00 6.00 6.00 6.50 6.00 10.00 10.00 13.00 10.00 04005 Papayas 3 KG. 8.00 6.00 6.00 5.50 6.00 5.00 6.00 7.50 10.00 12.00 12.00 9.00 04009 Apples 1 KG. 20.00 50.00 50.00 50.00 48.00 50.00 50.00 50.00 50.00 50.00 50.00 48.00 04009 Apples 2 KG. 20.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 04009 Apples 3 KG. 20.00 .00 50.00 50.00 50.00 50.00 50.00 .00 50.00 48.00 50.00 50.00 Nardos Ghebremedhin |
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 >average prices. 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: A. RECODE p1 TO p12 (0 = SYSMIS). B. 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. Post again, if I haven't understood your problem. |
Free forum by Nabble | Edit this page |