Bookmark and Share

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

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

Re: Re: st: .dta storage, why is too big?

From   "Clyde Schechter" <>
Subject   Re: Re: st: .dta storage, why is too big?
Date   Wed, 8 Jun 2011 12:19:34 -0700

Clarification to my earlier post (below)

Stata's specifications for the .dta format includes some "overhead" that
describes the contents of the file.  So, of course, one could create a toy
data set that has 1 observation on 1 byte variable, and it would be larger
as .dta than as .txt.

What I meant to say is that I have never seen a real-world data set where
the .dta is larger than the .txt version.

Clyde Schechter

On Tue, 7 Jun 2011, Daniel Marcelino wrote:

> Hello for all,
> today I came across my old and new files size, R and Stata storage
respectively. This got me thinking about why Stata compression is too
inefficient compared to R? Even thought I use variable attributes like
labels R compression is incredible. For example, 530 mb of Stata file
turns into 9 mb R file and about 330 mb as txt file.  So, my point is:
do you know any trick to compress Stata files addition to command line

and Daniel Feenberg replied that Stata doesn't do any "Shannonesque

That is true, but I really wonder if there isn't something wrong with
Daniel Marcelino's Stata installation, or something very odd about the
file that provoked his post.  I have been using Stata since version 4 and
I have _never_ in all those years encountered a data set that was larger
as .dta than as a text file.  The .dta version may not be much smaller
than the text version, but, I have never seen it be larger.

Clyde Schechter
Associate Professor of Family & Social Medicine
Albert Einstein College of Medicine, Bronx, NY, USA

Please note new e-mail address:

Clyde Schechter, MA MD
Associate Professor of Family & Social Medicine

Please note new e-mail address:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index