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
Multinomial Logit ModelingGreetings- I am looking for some advice on a multinomial logit model with marginal effects. The mod…
Twoway spline with multiple variablesHi All, I am currently using a twoway connected graph, with multiple variables as follows: Code:…
how to suppress display of the interval from -1 to 1 of x-axisHere is the code: Code: * Example generated by -dataex-. To install: ssc install dataex clear inpu…
average weighted scoresDear Statalists, I have a survey data that contains categorical variables in the Likert scale (typi…
how to suppress the interval from -1 to 1 of x-axisHere is the code: Code: * Example generated by -dataex-. To install: ssc install dataex clear inpu…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape Long
Post a Comment