usemtw - import Minitab *.mtw datasets into Stata

usemtw will import to Stata the Minitab binary data files (*.mtw).

Description

usemtw facilitates data exchange between users who have data in Minitab format, but don't have access to the Minitab software. This converter is written in Mata and does not require Minitab software for conversion. Stata 9.2 or newer is required however.

Minitab's binary data format is not publicly documented, and the author is not aware of any open-source stand-alone readers, which could be taken as a base for porting to Stata. Specifically, R's foreign package as of now does not support Minitab's binary datasets (it supports Minitab Portable Datasets, extension *.mtp). See for example this discussion.

This program is the result of the effort to reverse engineer the Minitab dataset format to make it more accessible for researchers using Stata. This effort is based on the large number of files available in the Internet in Minitab format and alternative format (mostly ASCII text and Excel formats). As such, caution should be taken when converting the data.

Warning: Minitab files have been spotted in the wild, which are not handled properly by this converter, despite they appear compatible. In most such cases no data is produced at all, but in extremely rare cases datasets may be produced with malformed content.

Commercially available professional tools like Stat\Transfer can convert Minitab datasets to Stata format. They usually have more features.

If Minitab software is available, it is recommended to use it (rather than this converter) to write the *.mtw data in a more accessible format (e.g. Excel *.xls format).

Here is what the users need to know about the assumptions and limitations of usemtw

Installation

Stata 9.2 or newer is required. If you are using Stata 9.0 or 9.1, free update is available from StataCorp. Installing any available updates (especially for older versions of Stata) is always recommended.

To install usemtw type literally the following in Stata's command prompt:

   net from http://radyakin.org/transfer/usemtw/beta

Then click on the link for usemtw in the Stata's viewer and click the install link.

Usage

Simplest mode of operation is a dialog mode. Type usemtw in Stata's command line and get a file selection dialog, in which the user can select the data file:

To import a Minitab file type the following command in Stata's command line:

   usemtw "filename.mtw"

For example:

   usemtw "C:\Data\cars.mtw"

Filenames must be enclosed in quotes. Even when they don't contain a space.

File extension must always be specified. The program will not impute or invent one if none is specified.

If your data in memory is modified, it is your responsibility to preserve the changes. The program will discard the data in memory without asking the user.

Web data is also accessible with this command:

   usemtw "http://www.rossmanchance.com/pub/ws2/mtw/senate99.MTW"
or
   usemtw "http://www.stats.gla.ac.uk/data/3H/Inference/old/FDESIGN/SOYBEAN.MTW"
There is a large number of MTW datasets supplied with various textbooks in Statistics and university-level course pages. For example: Here, here, here, or here .

To get information about the program, type:

   mata usemtw_about()

Note that Stata's built-in file manipulation commands are not affected by usemtw, and you will continue getting error 610 on attempt to apply them to any Minitab files. To append or merge Minitab data you need to convert it first to Stata format by importing with usemtw and saving in Stata native .dta format. Similarly to this clarification.

Author and support

usemtw was written by Sergiy Radyakin. To contact the author, start a thread with your question or problem description at Statalist and tag it usemtw.