You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
There must be a (probably simple) way to determine the version (or the format number) of a dataset, but I did not succeed in finding out how. Some of you guys know, I know.
I do not know a simple way to achieve this, but this piece of information can be read from the header of the dataset. See help dta for more information. One (complicated) way to retrieve this information would be to read the header of the file with the Stata file command or the fopen() function in Mata and look for <release>...</release>. I have to admit that I would think twice before choosing this solution. If anyone knows a more obvious way I would like to know too
Trying using "findit dta version" in Stata 13 but the results doesn't include the user written command "dtaversion". Any ideas of why this is the case?
In Stata 13 and up dtaversion is an official Stata command. Type -help dtaversion-. It is also easier to find if you leave out the space, e.g. -findit dtaversion-.
------------------------------------------- Richard Williams, Notre Dame Dept of Sociology
StataNow Version: 19.5 MP (2 processor) EMAIL: [email protected] WWW: https://www3.nd.edu/~rwilliam
I had done tried this but it seems it isn't installed since there is no help for the command . I also used both "findit dtaversion" and "findit dta version" but the results didn't include the command. Am using SE version of Stata, not sure if this makes a difference.
1. dtaversion and dtaverify are new, undocumented commands in Stata. "Undocumented" means
the commands are not documented in the manuals but are documented online.
dtaversion reports an internal .dta file-format version number and the corresponding
Stata version number. The command is probably of little interest outside StataCorp.
dtaverify confirms the consistency of a .dta file; that is, it checks whether the .dta
file is corrupt. For most of us, this command is useful when we want to determine the
file is not damaged from an accident, say, coffee spilling on the computer.
Programmers writing programs to write Stata .dta files will find dtaverify even more
useful because they can use it to debug their programs. dtaverify provides a lot of
useful information when the .dta file has errors.
@Doug Yes indeed, but older Stata files are likely to be readable by any recent version of Stata. The question Can I read this dataset? can be answered by trying.
If a dataset is too recent to be read, will dtaversion in 13 or 14 tell you what version of Stata you need to read it? I have yet to experiment.
Comment