Sorry - I know this is very basic, I'm a relatively novice.
If I want to manipulate a variable that is a word into a number, how do I do it? I've been able to answer most of my Stats questions using online tutorials thus far, but I haven't been able to successfully do this.
As an example, let's say I have a variable called letter. I have two options for the variable letter, "alpha" and "beta." I want to change alpha to 1 and beta to 2. I think it's some variation of destring, but I can't get the syntax right. I've had to do this in the past with small data sets and simply manually manipulated the data sheet, but I have larger data set for which manual manipulation would be cumbersome.
Thanks!
Related Posts with String to numeric
multivariate multiple random effects regressionsHey all, I am doing a research about the effect a dummy has on multiple dependent variables while a…
Population size smaller than number of observation, svysetDear Stata users, After applying svyset command to dataset with weights included in the dataset and…
how do i match two colums with different patterns of city namesHi, I want to match 2 columns with different patterns of city names (not sorted, no similar observa…
Hierarchical Cluster Analysis (Centroid Linkage): currently can't handle dendrogram reversalsHello Everyone, I am having an issue displaying a hierarchical cluster analysis dendrogram using ce…
Merge weekly and daily dataHi everyone, I am new here so I will try my best to make my question as clear as possible. Hope you …
Subscribe to:
Post Comments (Atom)
0 Response to String to numeric
Post a Comment