I have used the command "reshape" for years very frequently. However, when I tried to ran it again today, it did not work.
Specification: There is a variable "id" (uniquely identifying the data) and 36 variables "seq1"-"seq36" in the data set
I tried this command
"reshape long seq1-seq36, i(id) j(j)"
alternatively
"reshape long seq*, i(id) j(j)"
I got this response (in red):
"no xij variables found
You typed something like reshape wide a b, i(i) j(j).
reshape looked for existing variables named a# and b# but could not find any. Remember this picture:
long wide
+---------------+ +------------------+
| i j a b | | i a1 a2 b1 b2 |
|---------------| <--- reshape ---> |------------------|
| 1 1 1 2 | | 1 1 3 2 4 |
| 1 2 3 4 | | 2 5 7 6 8 |
| 2 1 5 6 | +------------------+
| 2 2 7 8 |
+---------------+
long to wide: reshape wide a b, i(i) j(j) (j existing variable)
wide to long: reshape long a b, i(i) j(j) (j new variable)
r(111);"
Does anybody know, why the command does not work and/or knows how I can work around this problem?
I would be very grateful for any suggestions!
Related Posts with Problem with command "reshape" (Stata 14)
replace with multiple if statementHello everyone, I am trying to replace values of the variable "NomenCode" based on multiple if state…
How do I identify a variable within a date intervalHI, Would someone be able to help me with a code for how to identify a viable within a date interva…
Difference-in-difference with three time periodsHi statalist, I’m running a difference in difference model with time fixed effects. My sample inclu…
xtreg vs xtpoisson difference in observationsHello all, I have a dataset of 4789 observations (unbalanced 194 groups and 25 years) . The way thi…
Interpretation regression results moderation with factor variableHi all! I hope you can help me out with the interpretation of my regression results as the internet…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with command "reshape" (Stata 14)
Post a Comment