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 commands "version" and "saved results"
From
Marco Ercolani <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Stata commands "version" and "saved results"
Date
Tue, 18 Jan 2011 11:53:54 +0000
Dear Statalisters,
I need a command that returns an integer for the version of Stata anyone is using.
I then want to use this integer to decide what save command to implement,
along the lines of:
if e(V)>=10: saveold dataset.dta
if e(V)<0: save dataset.dta
I know that many commands exists to ask Stata what version is running but the
manuals do not document if any of these commands produce "saved results":
Examples:
. version
version 11.1
. display c(version)
11.1
. about
Stata/MP 11.1 for Windows (64-bit x86-64)
Born 04 Nov 2010
Copyright (C) 2009 StataCorp LP
This following simple solution does not work because it still saves the data as version 10:
version 9.2: save dataset.dta
Yours,
Marco.
Dr Marco G. Ercolani
Department of Economics
University of Birmingham
Edgbaston, B15 2TT
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/