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)
Out of sample estimation following xtdpdgmmStata throws a 301 error (last estimates not found) whenever I try to use estimates from a dynamic m…
Need help with sampling processHello, I am working with a dataset with merged data from 2 survey rounds (2005 & 20011). The f…
Stationarity, Markov switchingHi everyone, I was trying to model times series with markov switching regimes. Preliminarily, do I n…
GMM for time seriesHello Statalist, 1.I am using time series data. my main equation is pbt = a0+a1pbt-1+a2pdt-1+ogt+e b…
Cartesian product of ColumnsDear Statalisters, I have 2 sets Set_1= {HH, HT, TT, TH} and Set_2 = {1, 2, 3, 4}. These are the in…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with command "reshape" (Stata 14)
Post a Comment