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 alphabetical category of a variable or recode as numericI have an occupation variable that has 25 categories such as professionals, sales, farmers, self-emp…
Ordered logistic regression assumptionHello, I would like to ask what alternatives are better over ordered logistic regression if the ass…
Including a lagged Dependant Variable in DiD analysisI am using a fixed effects model for a monthly panel data set, which is of the form: Code: xtreg ln…
Coding participants with metabolic syndromeHi, I am trying to classify all the participants in my sample who have metabolic syndrome and I was…
Missing F-statistic and underestimated standard errors using xtreg dummy-variables i.year, fe vce(cluster)Dear all, Stata does not report the F-statistic when I cluster the standard errors at the firm leve…
Subscribe to:
Post Comments (Atom)
0 Response to Generate a variable containing the values of other variables
Post a Comment