Help file for the command stata2mlwin -------------------------------------
stata2mlwin using <stata data file> , [ replace clear nocons missing() ]
replace - Use to replace the existing file
clear - Use to clear out the existing file in data
nocons - Use to suppress the creation of the var cons which contains 1s (useful for creating a constant term in MLwiN).
missing() - Sets the code used for missing values in MLwiN. By default, missing values are coded as -12345, but you can change this with the missing() if you think that -12345 is a possible value for your data.
This file reads a Stata data file and creates an MLwiN program (an obey file) that creates a corresponding MLwiN data file complete with variable names and value labels. By default, a variable cons is includes which contains all 1s (unless you already have such a variable or you use the nocons option). You can then use this for including a constant in your MLwiN model.
stata2mlwin using c:dataauto
This reads the data file "auto.dta" from the c:data directory and creates the file "auto.obe" which is an MLwiN obey file which can then be executed in MLwiN, as follows.
From within MLwiN
Choose Data Manipulation -> Command Interface then at the command prompt type wipe which clears out data from memory, if any. Then type obey C:dataauto.obe which runs the program to make the MLwiN data file, saving it as C:dataauto.ws .
** Missing Data ** If you have any missing data, from within MLwiN choose Options Worksheet then Numbers to tell it what values are missing (by default -12345, unless changed with the missing() option).
Statistical Consulting Group Institute for Digital Research and Education, UCLA email@example.com