Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Richard Williams <richardwilliams.ndu@gmail.com> |

To |
statalist@hsphsun2.harvard.edu, Stata Help <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: -reshape- and variable names involving zero (0) |

Date |
Sun, 27 Oct 2013 17:26:44 -0500 |

At 03:43 PM 10/27/2013, Roberto Ferrer wrote:

This derived from http://www.stata.com/statalist/archive/2013-10/msg00949.html The following does not give the result I would expect: *------------------------ begin code ---------------------------------------- clear input id str4 ticker str20 type return06 return07 return08 1 "ABCB" "formation" 0.01 0.2 0.3 2 "AEDU" "formation" 0.02 0.4 0.5 3 "AMBV" "formation" 0.01 0.2 0.3 1 "ABCB" "buysell" 0.01 0.2 0.3 2 "AEDU" "buysell" 0.01 0.2 0.3 3 "AMBV" "buysell" 0.01 0.2 0.3 1 "ABCB" "holding" 0.01 0.2 0.3 2 "AEDU" "holding" 0.01 0.2 0.3 3 "AMBV" "holding" 0.01 0.2 0.3 end reshape long return, i(id type) j(period) list*--------------------- end code------------------------------------------------In the output I can see: xij variables: return6 return7 return8 -> return which I believe should be: return06 return07 return08 Notice the zeros are cropped out. If I rename return06, return07, return08 to return16, return17, return18, the code returns what I expect. What am I missing? What's the problem with the original names and -reshape- ?

You also get this warning message: . reshape long return, i(id type) j(period) (note: j = 6 7 8) (note: return6 not found) (note: return7 not found) (note: return8 not found)

------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**References**:**st: -reshape- and variable names involving zero (0)***From:*Roberto Ferrer <refp16@gmail.com>

- Prev by Date:
**st: Qreg on Multiple Iterations of Data** - Next by Date:
**Re: st: -reshape- and variable names involving zero (0)** - Previous by thread:
**st: -reshape- and variable names involving zero (0)** - Next by thread:
**Re: st: -reshape- and variable names involving zero (0)** - Index(es):