Prev: path analysis with categorical variables
Next: Reading a directory and selecting only desired filenames
From: Dan on 25 Mar 2010 13:22 I'm having a problem finding the mode over a subset of data... I have a dataset describing retailers' prices of particular goods per day, sorted by store, UPC, day. I am trying to find a way to record, for each observation where the price is recorded, the modal price over the previous and following 20 days. so that for every observation with a price, modeprice=mode(price variable from day-20 to day+20) The only way I know how to compute the mode is with proc univariate, but I'm not sure how to use it in this context. There may be a simple solution to this problem: I am very much a SAS beginner... |