Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: unrecognized command merge in reshape


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: re: unrecognized command merge in reshape
Date   Wed, 13 Apr 2005 20:03:59 -0400

Dan said that he had trouble reshaping after kdens2. I did the first example in kdens2 help file adding saving(dan):

. kdens2 linv lmkt,saving(dan)

. use dan,clear

. desc

Contains data from dan.dta
obs: 2,500
vars: 5 13 Apr 2005 20:01
size: 72,500 (99.9% of memory free)
------------------------------------------------------------------------ -------
storage display value
variable name type format label variable label
------------------------------------------------------------------------ -------
_i float %9.0g
_j byte %9.0g
_lmkt double %10.0g Log[Mkt value]
d double %10.0g
_linv float %9.0g
------------------------------------------------------------------------ -------
Sorted by: _i _j

. reshape wide d _lmkt _linv,i(_i) j(_j)
(note: j = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2
> 8 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50)

Data long -> wide
------------------------------------------------------------------------ -----
Number of obs. 2500 -> 50
Number of variables 5 -> 151
j variable (50 values) _j -> (dropped)
xij variables:
d -> d1 d2 ... d50
_lmkt -> _lmkt1 _lmkt2 ... _lmkt50
_linv -> _linv1 _linv2 ... _linv50
------------------------------------------------------------------------ -----

I wonder if Dan's copy of Stata is up to date. What does update query say?

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index