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

From |
Alan Neustadtl <alan.neustadtl@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: memory problem |

Date |
Thu, 5 Mar 2009 17:09:08 -0500 |

I routinely use the GSS including the cumulative file extending from 1972 through 2006. My file is approximately 282.5 megabytes and like you I have 2G of memory. I have needed to increase the maximum number of variables Stata can access as well as the total memory. The following three commands work on my installation: /* BEGIN CODE */ set maxvar 5200 set mem 300m use GSS-Cumulative-72-06.dta /* END CODE */ As others have suggested you can read in s subset of variables if you know the variable mnemonic . The following Stata code provides one example: /* Create a subset of GSS Data */ #delimit ; use year cohort socbar socrel socommun socfrend race age sex educ attend marital childs premarsx reliten childs polviews sexfreq if race!=3 using GSS-Cumulative-72-06.dta, clear; #delimit cr /* END CODE */ Last point, when I first read in the GSS data from a text file to Stata I was able to -compress- the file size by changing the data storage type to the most efficient possible without losing any precision. The Stata file provided by ICPSR (if this is where you got your data) makes no attempt to be efficient. I think I cut the file size in half by changing the storage types. Best, Alan On Thu, Mar 5, 2009 at 9:19 AM, Rudy Fichtenbaum <rudy.fichtenbaum@wright.edu> wrote: > > I am trying to load a single year of the General Social Survey but I don't > seem to have enough memory. I have 2g and Stata 10/SE but Stata will only > let me assign 1g and that doesn't seem to be enough. Stata suggests dropping > variables but since I can't load the dataset I don't know how I could drop > variables. Any suggestions? > > Rudy > * > * 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/ > * * 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/

**References**:**st: memory problem***From:*Rudy Fichtenbaum <rudy.fichtenbaum@wright.edu>

- Prev by Date:
**Re: st: Enquiry From PhD Student** - Next by Date:
**st: RE: AW: RE: AW: RE: AW: irecode problem** - Previous by thread:
**st: RE: memory problem** - Next by thread:
**Re: st: AW: Nº of Observations in Probit regressions** - Index(es):

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