Using the cont3.inp example in the Continuous set of examples on this
website, we have generated 10 data files for the model and wish to run
cont3_ex.inp using all 10 data files. The results for all 10
runs should be saved into a file so that it can be processed as data.
Steps to use RUNALL :
- Place all the data files to be used for the run in one directory.
The data files are located in the C:\Projects\Testdata directory.
Set DATA_DIR in runstart.bat to C:\Projects\Testdata.
- Place the input file in a working directory.
The working directory is C:\Testdir. Set WORKING_DIR in runstart.bat
to C:\Testdir.
Here is the input file for this run:
TITLE: cont3_ex (example to demonstrate the use of RUNALL)
Classic structural equation model with multiple indicators
used in a study of the stability of alienation.
Source:
Wheaton, B., Muthen, B., Alwin, D., & Summers, G. (1977).
Assessing the reliability and stability in panel models.
In D.R. Heise (ed), Sociological Methodology 1977.
San Francisco: Jossey-Bass.
DATA:
FILE IS cont3_data.dat;
VARIABLE:
NAMES ARE anomia67 power67 anomia71 power71 educ sei;
MODEL:
! first the measurement model part using the keyword BY:
ses BY educ sei;
alien67 BY anomia67 power67;
alien71 BY anomia71 power71;
! next the structural model part using the keyword ON:
alien71 ON alien67 ses;
alien67 ON ses;
! and then adding correlated residuals over time using
! the keyword WITH:
anomia67 WITH anomia71;
power67 WITH power71;
OUTPUT:
sampstat tech1;
SAVEDATA:
FILE (RESULTS) IS results.sav;
Important parts from the input file
DATA:
FILE IS cont3_data.dat;
The data file specified in the input is cont3_data.dat.
The filename given here is only a generic name. It does not
include a direct path. No data file
needs to exist with this name when using RUNALL .
As the utility loops through all the files in your data
directory, it will copy each file to the working directory
and rename it cont3_data.dat. Set COMMON_DATA in runstart.bat to
cont3_data.dat.
Also, it is assumed here that all data files used for this input
are in free format. For any run, all data files in the set
to be used for a particular input must have the same data format.
SAVEDATA:
FILE (RESULTS) IS results.sav;
The RESULTS file saved for each run is results.sav.
Set COMMON_RESULTS in runstart.bat to results.sav.
OUTPUT:
sampstat tech1;
TECH1 output option has been requested so that we can see
the order of the parameter specification. SAVEDATA RESULTS
will save the parameter estimates and standard errors of the
parameter estimates in this order.
- Change the necessary settings in runstart.bat to customize
the run.
Following are the settings in runstart.bat for this run:
REM **************************************************************
REM * WORKING_DIR *
REM * The working directory. This is the directory in which *
REM * you should place the input and use the RUNALL utility. *
REM **************************************************************
SET WORKING_DIR=C:\TESTDIR
REM **************************************************************
REM * DATA_DIR *
REM * The data directory. This is the directory which *
REM * contains the data files. It is recommended that this *
REM * directory be different from the working directory. *
REM **************************************************************
SET DATA_DIR=C:\PROJECTS\TESTDATA
REM **************************************************************
REM * FILES *
REM * Wildcard expression describing the data files you want *
REM * to use in the data directory. *
REM **************************************************************
SET FILES=*.DAT
REM **************************************************************
REM * INPUT_FILE *
REM * Name of the input file. *
REM **************************************************************
SET INPUT_FILE=cont3_ex.INP
REM **************************************************************
REM * COMMON_DATA *
REM * Name of the data filed specified in the input file. *
REM **************************************************************
SET COMMON_DATA=cont3_data.DAT
REM **************************************************************
REM * COMMON_RESULTS *
REM * Name of the file specified for the SAVEDATA RESULTS *
REM * option. *
REM **************************************************************
SET COMMON_RESULTS=results.SAV
REM **************************************************************
REM * ALL_RESULTS *
REM * Name of the file to which results from each run should *
REM * be saved. *
REM **************************************************************
SET ALL_RESULTS=cont3_results.SAV
REM **************************************************************
REM * TEMP_FILE *
REM * Name of a temporary file for use by the RUNALL utility. *
REM **************************************************************
SET TEMP_FILE=runall.tmp
REM **************************************************************
REM * ERROR_LOG *
REM * Name of the error log file. This file contains the *
REM * names of data files which caused the model to not *
REM * terminate normally. *
REM **************************************************************
SET ERROR_LOG=error.log
REM **************************************************************
REM * COMPLETED_LOG *
REM * Name of the log file for completed runs. This file *
REM * contains the names of data files for which the model *
REM * terminated successfully. The order of the data files *
REM * listed in the COMPLETED_LOG file corresponds to the *
REM * order of results saved in the ALL_RESULTS file. *
REM **************************************************************
SET COMPLETED_LOG=completed.log
- Type
RUNALL at the MS-DOS prompt.
- When the run completes, look at the following files for information:
|