Hi, I know this may seem simple but I just can't figure it out.
I have 3 variables: Time, serial, code
Time expresses years, serial is a identifier variable and code is a variable which ranges between 1 and 50.
I want to generate a new variable (lets call it "nv") which contains the values of this 3 variables in this order: Time|serial|code
So for example if I have the following:
Time: 1999
serial: 143
code: 4
My new variable should look like this:
nv: 19991434
Thanks for your help.
Related Posts with Generate a variable containing the values of other variables
Drop observations corresponding to other variableI have two variables, Names1 and Names2, both consisting of certain names. A simplified e.g. is past…
Is there a Mata function for inputting to and outputting from local macros in the calling segment?Fellow Statalisters (especially StataCorp): Are there any Mata functions to input values from, and …
Diff-in-Diff Regression for Minimum Wage ImpactsHi all, I'm very new to Stata and I'm doing my own research for a class to write a paper. I'm trying…
Running pairwise correlation with both categorical and continuous variablesDear All, I need to look at the pairwise correlation with both categorical and continuous variables…
filter data use different group----------------------- copy starting from the next line ----------------------- Code: * Example g…
Subscribe to:
Post Comments (Atom)
0 Response to Generate a variable containing the values of other variables
Post a Comment