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)
Use Asrol and natural Log.Hi, I asked this question yesterday but it was not mentioned in the title so I followed the advice …
Merging panel dataHi there, I have panel data with each survey providing multiple STATA datasets from that sweep. Eac…
Making sure that histogram bin has more than 5 observations.I am working on a server with data on individuals, and there are very strict rules on how data shoul…
Combining plots using qchiHi, I've generated two variables, let's call them y1 and y2, and I want to generate a quantile-quan…
_mi_m & _mi_id not generatedHi All Below is my code for running multiple imputation on a longitudinal dataset in the wide forma…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with command "reshape" (Stata 14)
Post a Comment