Bookmark and Share

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


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

st: Stata appears to be eating some string IDs when saving a file


From   "Dimitriy V. Masterov" <[email protected]>
To   Statalist <[email protected]>
Subject   st: Stata appears to be eating some string IDs when saving a file
Date   Sat, 30 Mar 2013 14:25:10 -0700

I am having a strange problem with Stata deleting the values for about 80%
of my data when I save a file. It only does it for string variables,
and this only happens some of the time that I run this code.

Here's the relevant part:

. des ;

Contains data
  obs:    10,766,127
 vars:             4
 size:   387,580,572
------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
slr_id          str10  %10s
byr_id          str10  %10s
item_id         str12  %12s
pt_m2m_cat      float  %21.0g      pt_m2m_cat
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by:
     Note:  dataset has changed since last saved

. assert !missing(slr_id) & !missing(byr_id) & !missing(item_id) &
!missing(pt_m2m_cat);

. count;
10766127

. save "pt_m2m_cat.dta", replace;
file pt_m2m_cat.dta saved

. use "pt_m2m_cat.dta", clear;

. assert !missing(slr_id) & !missing(byr_id) & !missing(item_id) &
!missing(pt_m2m_cat);
3407873 contradictions in 10766127 observations
assertion is false
r(9);


My Stata MP is 12.1 (March 20, 2013), on an Ubuntu box. Any ideas how
to diagnose this?

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


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