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

Re: st: data size


From   Dan Blanchette <[email protected]>
To   [email protected]
Subject   Re: st: data size
Date   Thu, 3 Feb 2005 13:54:35 -0500 (EST)

Stata offers an online interactive dataset calculator so that you
can determine how much memory Stata will need to generate that
dataset:

http://www.stata.com/support/faqs/data/datacalc.cgi

So, based on your numbers you seem to have a very large (for a pc) dataset,
about a 10,000 megabyte file (10 gigabytes).

Your computer may only have 500 megabytes of memory available if it's a fairly new
and average pc.

Since Stata puts the whole dataset into memory, you will need to consider
how many variables and/or observations you really need to use at one time.

These commands will be helpful:

. describe using "mybighonkingfile.dta"

. use [a varlist of the vars I need] using "mybighonkingfile.dta"

. use in 1/10000 "mybighonkingfile.dta"

. use [a varlist of the vars I need] in 1/10000  using "mybighonkingfile.dta"

. use [a varlist of the vars I need] if [some condition is true]  using "mybighonkingfile.dta"


You may be able to reduce the size of your file by converting it again from SPSS
to Stata by choosing "compress" (if that's available) in your conversion software
package.  This will set your variable lengths to the minimum required to store
your data acurately.  If you have categorical data (no decimal values), this could reduce
the size of your datafile significantly.

Hope this helps.

Dan Blanchette

Applications Analyst Programmer
Carolina Population Center UNC-CH
[email protected]




**********************************************
st: data size



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