You can view this FAQ as a movie using the Real Media player, among others.
We have created a program called stata2mlwin that you can use to convert your Stata program into an MLwiN program that you can run to create a MLwiN data file.
Note that stata2mlwin now creates an additional variable called cons which is a column of 1s, which can be used for including a constant in the equations window in MLwiN (unless you already have such a variable or specify the nocons option).
You can download stata2mlwin by typing search stata2mlwin (see
How can I use the search command to search for programs and get additional
help? for more information about using search).
Say we want to convert the a file called c:datahsb2.dta to an MLwiN data file. After installing stata2mlwin, you would type this.
stata2mlwin using "c:datahsb2"
Then you would start MLwiN and click Data Manipulation then Command Interface and then enter the wipe command and then obey “c:datahsb2.obe” (substituting c:datahsb2.obe with the name of your file). This then reads the data into MLwiN (including variable names and value labels). (Please note that with MLwiN version 2.27, the path must be enclosed in quotes.)
We can then click on Data Manipulation then Names to see the names of the variables to check to see if they were read in properly.
We can then click File then Save Worksheet As… and then save this data file as a MLwiN data file.