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)
Business CalendarHey everybody, I'm trying since a long while to change my daily data to business calendar data. Acco…
Spatial Model (xsmle) "Effects" vs. "Margins" - Why are they different?There seems to be an issue with the calculation of marginal effects for spatial models containing a …
Predict an out-of-sample value in StataHi all, I have a data set over a period 2008-2017. I estimated a gmm model based on this time period…
Multinomial logistic regressionHi all, I am working with a data set (sample below) that contains, among other things, four binary v…
How to generate type III table for mixed linear models in Stata?Hello, I'm new to Stata and I'm trying to obtain a type III table for a mixed model in Stata? Any su…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with command "reshape" (Stata 14)
Post a Comment