@vijay24 wrote:
I have a variable with categorical observation.
eg
id eth
1 1
2 1,2,3
3 2,5
4 4
and so on.....
The data is present in a csv format file. When i import the data, SAS does not recognize the comma between the observations. My proc freq appears something like this:
In a CSV file if values separated by commas are supposed to appear as a single value then the file should have the text appearing as "1,2,3" , within quotes to indicate such. If your text file does not have the quotes then it is not complying with the rules for a CSV. Or possible you want them as a single value when you shouldn't. Generally such as you show is very difficult to work with.
And depending on how you read the data there could be other issues if the values did appear that way. If you use proc import to read a file then SAS makes guesses as to column types and lengths and by default does not look at very many rows. Potentially if the first 20 rows did not have any of the grouped values then SAS may have set the field to be numeric and then such values would be considered invalid data as 1,2,3 is not a valid numeric value.
... View more