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', ...)
label of x-axisDear All, I was asked this question (https://bbs.pinggu.org/thread-10348633-1-1.html). The data set …
Conflicting results with egen, max()Dear all, I'm trying to answer a question here: https://stackoverflow.com/questions/...rvations-sta…
Minimum (or Maxium) Value in a MatrixI am using Stata 16 on Windows 10. I am running analyses (logit and mlogit) on 12 outcome variables,…
Multilateral Resistance Term for distanceDear Statalist, I am trying to calculate a variable called "Mdistance" that was introduced in Baier…
Multivariate probit with sample selectionDears, I am developing a multivariate probit model in which one of the variables "access to qualifie…
Subscribe to:
Post Comments (Atom)
0 Response to Issues with string variable that takes numeric values ('1', '2', ...)
Post a Comment