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

Re: st: data size

From   Dan Blanchette <>
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

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

st: data size

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