@lisa2002 wrote:
Hello everyone,
I'm new to SAS and I need some assistance. I have to create a counter variable to count the number of observations in the dataset
status Cause of Death sex
dead other female
dead female
alive cancer male
alive other male
These are some of the columns in my dataset. There is 18 columns total maybe I am a bit confused on what a counter variable is please provide some assistance.
I found this example... am I headed the right way??
It depends on what you want.
Number of observations total in the data set?
Or of specific values in the data set?
Do you need a data set (something processed by another program or steps) or a report (people read these)?
Proc contents will report on the total number of observations in the data set.
Proc freq will count number of observations with each value and number missing.
Can you show a small example of the data at start and what the result should be?