Dear all,
I am using this code to reshape data. It does reshape but the date order of the original file gets altered. i want to reshape but keep the order of date and entity intact. Kindly help me to update this code:
foreach var of varlist * {
local j = "`: variable l `var''"
local newname = strtoname("`j'", 1)
rename `var' V_`newname'
}
destring,replace
generate id = _n
reshape long V_ , i(id) j(dat) string
list, sepby(id)
Thanks in anticipation.
Related Posts with Reshape Long
Solving for unbalanced panel data across years - SOSHi Forum, I have been trying to do this on my own but I cannot find information either solve it. So…
what does curly brackets mean in stata help files?I know square brackets mean optional components, vertical bar means OR, but what do curly brackets {…
Gravity modelHello everyone. I want to do analysis of tourist flows by gravity model in STATA 11 but have not exp…
Heckman correction for one of the variables in an indexHi, I'd like to estimate treatment effects on an index variable constructed using three variables. …
Change all the values to zero for a certain period of time Hello! I'd like to get some advice. I have the following forms of data. I'd like to change all the…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape Long
Post a Comment