Hello,
I would like to rename a variable (suppose it's name is VAR) with the content that is in a specific observation (let's say A[3] has the name of a city).
So, I want he name of VAR to be the name of the city in A[3].
My only idea was the following command:
rename (VAR) (A[3])
I know that to replace the content of VAR with the content of A[3] I can use
replace VAR = A[3]
But I want the name of VAR equal to the content of A[3].
Can someone help me?
Related Posts with Rename a variable with content
Westerlund ECM panel cointegrationGood morning, I would like to apply a Westerlund and Edgerton (2007) panel bootstrap cointegration t…
Labelling group patterns in concatenated variableGood morning. I would like some help regarding how to label concatenated variables. I have almost 40…
Selecting values from panel dataI have data on visits to a clinic. In the example below, "value date" is the date of the clinic visi…
Solving complex equations with STATADear Statalists, can anybody help me solve equations with STATA? In particular, I have one equation …
Create variables with loopHi, i would like to create some variables with loop. I have 5 variables : switch1 / switch2 /.../ sw…
Subscribe to:
Post Comments (Atom)
0 Response to Rename a variable with content
Post a Comment