Hello,
I currently have two datasets with a variable that is called scrambled_id. Scramble_id represents a unique campus. However, both data sets that use scramble_id have a different total number of observations so it is impossible to encode from string (values) to numeric. Scramble_id is a string variable with observations similar to this set up: 132$WWW$P. This type of setup is similar for almost all the observations as they are scrambled to mask identity. I am trying to create a new variable that is converted from scramble_id (which is string) to a numeric variable that would be the same for both datasets so that I could merge both datasets by this variable later on. Any assistance would be appreciated. An example of the variable and observations is below.
scrambled_id
132$WWW$P
136P74WEW
137353W$W
134P2WW22
131470P33
137PWWP15
138264$W7
1360W0$$W
13757RPRP
134045P10
137P65$W3
132134$L7
132375P01
13450WP$3
135410R06
1395W2P$7
136150PR3
13935$$35
130P65$E4
Related Posts with converting unique string variables from two datasets that are characters and numbers to numeric variable
How to simulate data with specified ROC AUC and specified odds ratioI would like to do the following: 1- simulate 1000 observations 2 - simulate a continuous biomarker …
Advice for Imputing my Control VariablesHi everyone, I hope everything is well! I'm reaching out because I read some guidance on imputing b…
Analysing which colour contributes to the greatest price premiumHi Everyone, I hope you're well! I am trying to observe what colours have the greatest price premi…
Counting number of individuals (by sex and age) that answer a question in a longitudinal studyHello, I have a dataset with information of abuse (variable name: abused) at work by age and sex (v…
Testing measurement invariance across two groups/endless iterations when fitting the modelI am trying to test measurement invariance for a scale with 20 items loading 4 latent variables (no …
Subscribe to:
Post Comments (Atom)
0 Response to converting unique string variables from two datasets that are characters and numbers to numeric variable
Post a Comment