Return to Construction guide / CAMSIS home
5.2 Row-column association modelling using LEM: commands
The first step is to use the latest version of the SPSS data file to output a simple data file which can be read by LEM. In this example, we export the title-by-status and title-only units as well as the indicator of the title frequency, running the model on the title-by-status units. Appropriate SPSS syntax is below :
The order in which the variables are exported from SPSS is important!get file="revisions1.sav". write out="mdat1.dat" / hbst4 wbst4 hocc4 wocc4 freq (5 (F8.0)). execute.That data can then be read and analysed in LEM by entering appropriate arguments for the RC model commands. The LEM manual, freely available on the web, explains the model options in further detail. An appropriate annotated command file, named eg model1.inp, is shown below :
CONTENTS OF MODEL1.INP :Subsequently, such a command file and variants of it can be called through an MSDOS batch file with a form as those below :
CONTENTS OF COMFILE.BAT :
# LEM command file # (hash symbols indicate comments) # Info on : [Country] [Year] [Version] [base unit] # Update 1 #lem95 modelold.inp modelold.out e:\camsis\country\version\etc\ modelold.log -log lem95 model1.inp model1.out e:\camsis\country\version\etc\ model1.log -log lem95 model2.inp model2.out e:\camsis\country\version\etc\ model2.log -log # (this batch file runs the model1.inp and model2.inp input files # after skipping the modelold.inp file) # The named directory must be the one which contains the input files, # data files and design matrices, and will be where the output # files are deposited.This command file itself can be called from the MSDOS prompt as follows (the path command is used to name whichever directory on your machine contains the lemwin executable files. :
MSDOS> MSDOS> path e:\programme files\lemwin\ MSDOS> comfile.bat MSDOS>