I read in a dataset that includes many columns of categorical variables denoted by '1', '2', ...
1) I cannot condition on the values directly -- br if variable=='2' will give error "'2' invalid name"
2) I cannot use destring to convert to numeric (they all end up as missing if I force it)
3) I've attached screenshots of what the codebook and tab commands show
Any ideas for how to either a) convert these to their corresponding integers or b) be able to condition on the string values
I am using Stata 16.
Related Posts with Issues with string variable that takes numeric values ('1', '2', ...)
How to create an aggregate observational unit by adding values by country and year.Hello, I have the following dataset for a number of countries. I would like to generate an aggregate…
Finding Market SharesHi all, I have a data in the following format. I need to calculate the market share where market sh…
ttesti equivalent of oneway ANOVAHi all, I need to compare means of a parameter of 8 groups (independent). I do have SD but I do not…
group string var with random namesHi, I have list of investor name which are not same like "investor group" var. I want to create a v…
egen, groupDear All, Suppose that I have this data set (the original question is here), Code: * Example genera…
Subscribe to:
Post Comments (Atom)
0 Response to Issues with string variable that takes numeric values ('1', '2', ...)
Post a Comment