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]

From |
Nick Cox <njcoxstata@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: -save- a varlist |

Date |
Tue, 30 Oct 2012 16:35:15 +0000 |

I see. Thanks for making this clear to me, Nick On Tue, Oct 30, 2012 at 4:10 PM, Jeph Herrin <stata@spandrel.net> wrote: > Agree - but I was referring specifically to Austin's suggestion of using > -outsheet- twice, then matching the labels back up to the values. I don't > think that approach is very easy to implement. > > As I stated right off, using -label save- is the most useful suggestion, and > does make the problem nearly trivial. > > > Jeph > > > > On 10/30/2012 10:54 AM, Nick Cox wrote: >> >> This seems contradictory to me. I can e.g. -outsheet- a variable as >> value labels and -label save- too. So, you can read the data back in >> and then -encode- them. I would rather not do that, sure, but it's not >> especially difficult and it could certainly be automated via >> program(s). >> >> Nick >> >> On Tue, Oct 30, 2012 at 2:46 PM, Jeph Herrin <stata@spandrel.net> wrote: >>> >>> Thanks for the various tips, this last one (-label save-, which I have >>> used >>> in other contexts, but forgot about) being the most useful. >>> >>> Regarding the other comments: >>> >>> * -outsheet- and -outfile- are obvious alternatives that don't really >>> solve the problem, in that labels are still lost >>> * unless of course I do it twice, once with and without value labels, >>> as suggested, but it's not trivial to recreate value labels that way >>> with the same underlying values >>> * per Austin's question, I can derive variables and save those >>> locally; I have many types of nested units, so generally I am >>> creating summary values for these different units (eg, patients, >>> physicians, hospitals) and want to save them out in separate files >>> for each type of unit. and there are some original variables (that I >>> didn't create) which I can also save locally because there is no >>> identifying data. >>> >>> >>> On 10/30/2012 10:23 AM, Nick Cox wrote: >>>> >>>> >>>> Note also -label save-. >>>> >>>> Nick >>>> >>>> On Tue, Oct 30, 2012 at 2:21 PM, Austin Nichols >>>> <austinnichols@gmail.com> >>>> wrote: >>>>> >>>>> >>>>> Jeph Herrin <stata@spandrel.net>: >>>>> And if you do that twice, the -nolabel- option can be used one of >>>>> those times, so you have both values and value labels. But why can't >>>>> you save the whole file locally, if you are allowed to save several >>>>> variables locally? >>>>> >>>>> On Tue, Oct 30, 2012 at 10:17 AM, Nick Cox <njcoxstata@gmail.com> >>>>> wrote: >>>>>> >>>>>> >>>>>> As Daniel Feenberg underlined recently, you can -outsheet- part of the >>>>>> data. In the same vein, -outfile- is another alternative. >>>>>> >>>>>> Nick >>>>>> >>>>>> On Tue, Oct 30, 2012 at 2:10 PM, Jeph Herrin <stata@spandrel.net> >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> I have a very large dataset (20gb) that I must access remotely, so >>>>>>> that >>>>>>> -use- and -save- each take about 30minutes. When I have this file >>>>>>> open, >>>>>>> I would like to create some secondary files that contain only 1-3 >>>>>>> variable. >>>>>>> >>>>>>> If the file were smaller, I would typically use -preserve-, -keep-, >>>>>>> -save-, -restore- to do this. However, this takes a couple of hours. >>>>>>> So >>>>>>> I am using >>>>>>> >>>>>>> . export excel var1 var2 var3 using file.xls, replace >>>>>>> >>>>>>> Then later using -import excel- to read them back in. This is much >>>>>>> faster, but has the obvious drawback that variable labels and other >>>>>>> attributes are lost. It is also aesthetically unsatisfying. >>>>>>> >>>>>>> Can anyone suggest an alternative? >>>>> >>>>> >>>>> * >>>>> * 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/ >>>> >>>> >>>> * >>>> * 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/ >>>> >>>> >>> * >>> * 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/ >> >> * >> * 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/ >> >> > * > * 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/ * * 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/

**References**:**st: -save- a varlist***From:*Jeph Herrin <stata@spandrel.net>

**Re: st: -save- a varlist***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: -save- a varlist***From:*Austin Nichols <austinnichols@gmail.com>

**Re: st: -save- a varlist***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: -save- a varlist***From:*Jeph Herrin <stata@spandrel.net>

**Re: st: -save- a varlist***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: -save- a varlist***From:*Jeph Herrin <stata@spandrel.net>

- Prev by Date:
**[no subject]** - Next by Date:
**Re: st: Re: aweight** - Previous by thread:
**Re: st: -save- a varlist** - Next by thread:
**Re: st: -save- a varlist** - Index(es):