Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Phil Schumm <pschumm@uchicago.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: reshape a large wide longitudinal data set to long |

Date |
Mon, 14 Jun 2010 21:47:55 -0500 |

On Jun 14, 2010, at 6:09 PM, Amanda Fu wrote:

I am working on a wide version of longitudinal set : about 10000observations, 2000 variables totally for all the 10 years, data setsize : 113,440,212. It is wide because teh original data set iswide. Now I would like to reshape it into a long version, sincemost analysis can be done in long version. But it is not surprisingthe --reshape---command can not be done because the data set is toolarge. Stata suggests me to either increase memory, or to dropvariables or observations.The thing is, I have not finally decided what variables are going tobe used in the following analysis yet . If I drop variables, itwill cause the inconvenience that I might have to reshape again andagain to add variables in the long version. Definitely I will nottry to use all the 2000 variables in the analysis, but it is stillpainful to re-do the reshaping thing to add extra variables.

1) X_i, describing item i (i.e., constant within i) 2) Y_j, describing year j (i.e., constant within j) 3) Z_ij, describing item i in year j

I was thinking a clumsy way: I break down the original wide data setinto several small wide data sets , reshape them separately, andthen append all the small long data sets together. Is this way OK?

-- Phil * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: reshape a large wide longitudinal data set to long***From:*Amanda Fu <mandy.fu1@gmail.com>

**References**:**st: reshape a large wide longitudinal data set to long***From:*Amanda Fu <mandy.fu1@gmail.com>

- Prev by Date:
**Re: st: Making a local with no assigned value zero** - Next by Date:
**Re: st: RE: Outsheet with adding new lines** - Previous by thread:
**st: reshape a large wide longitudinal data set to long** - Next by thread:
**Re: st: reshape a large wide longitudinal data set to long** - Index(es):