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
Moving entire folders to different directoriesHello: I am trying to use the command -mvfiles- which seems to be a good way to move/copy files from…
npregress intro manual replicate figuresHi, I'm looking for the code behind the figures in npregress intro manual https://www.stata.com/manu…
Combining codes of different do filesI am trying to run the codes of two separate do files, combining them into the same do files. Each d…
Question on select data for a specific periodHi! I'm having trouble with data cleaning. My time_var data is in long format (eg. 31may2011) and af…
xtabond2 command : Fix for the Arellano-Bond Test for Autocorrelation of order 1Is it really mandatory to reject the Null Hypothesis of the Arrelano-Bond AR(1)? If so, is there a …
Subscribe to:
Post Comments (Atom)
0 Response to Generate a variable containing the values of other variables
Post a Comment