HowTo Run CG2
With the pre-processing steps complete you should have a binary input
file named cgout4 and the size of the problem stored in
runcg/02_size_calc.lst. You are now ready to run CG2, from the 02_runcg_out directory.
- The runcg2.ksh script will call cg2_4v3 for you and setup
everything the program needs to run. The first line of the script
should point to either the bash or ksh shell (by default /bin/bash).
Open the script in a text editor and make sure that the CG
variable points to the correct location of the cg2_4v3 binary on your
system. The PROGDIR variable should contain the name of the
directory containing the correct 02_size_calc.lst file.
- At the prompt type ./runcg2.ksh or ./runcg2.ksh & to put the process in the background.
- There are two log files. Runcg.log contains output from the
script, such as when CG2 started and finished, while cg.cglog contains
output from CG2. You can monitor the progress of CG2 by looking
at cg.cglog periodically. The size of the problem and memory
allocated should match what you expect. The first step is to read
the data, the second stage preconditions the data, the third stage
searches for the optimal paramater estimates, and in the final step the
results are output.
- Optional. The cgout
directory contains the synthetic data CG2 output files from the
reference system. Compare these with your cg.betas and cg.means
file to test your installation.
If you are successful two output files will be created
- cg.betas - Text file containing your parameter estimates.
The covariates or right hand side variables are listed first,
followed by the fixed person effects, and finally the firm effects
minus one. Since all of the person effects are estimated no
constant is included in the model. The covariates are correct as
reported by CG2, but the person and firm effects are not identified at
this point. The post-processing imposes the identification rules
in the next stage.
- cg.means - The mean of the dependent variable and each covariate.
Can be used to check if CG2 read in the data correctly and are
used in the post-processing.
Return to the HowTo or Main page.