@mvhoya wrote: My dataset currently contains multiple observations (rows) for each ID. So the same ID can appear in the dataset between 1 to 28 times and each time, it is linked to a separate visit_date. That's why I think converting it to a wide structure would allow me to run my frequencies more effectively, with the visit_dates all grouped to one ID in one row.
Frequencies of what?
With upto 28 variables that represent the same thing you need to use 28 variable names to get any frequency, whether in a data step to "count" one way or another or in any of the procs like freq or a report procedure.
Here's an idea: provide a dummy data set of 4 or 5 ID values with varying numbers of observations, say 3 to 10 at most. Then manually determine the sorts of output you need from that example data and show use the desired result with any "rules".
Or if that is two complicated look at the SAS supplied practice data sets like SASHELP.PRDSALE that has multiple estimates and results for different periods (think "visit" for time period), or SASHELP.STOCKS that has monthly summaries for multiple stock price values for different stocks.
If you have not worked with Proc Report or Tabulate then you might be surprised with just how many types of summary reports can be generated.
The main reason to move multiple records into a single one, in my opinion, is for modeling where you want one outcome per ID as the dependent variable of a model and need all the the other values to create the model. Which is way more than some frequencies.
... View more